All checks were successful
THE-TIP-TOP-MULTIBRANCH/pipeline/head This commit looks good
80 lines
1.6 KiB
YAML
80 lines
1.6 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
POSTGRES_USER: tiptop_preprod
|
|
POSTGRES_PASSWORD: tiptop_preprod_password
|
|
POSTGRES_DB: the_tip_top_preprod
|
|
|
|
volumes:
|
|
- tiptop_preprod_postgres_data:/var/lib/postgresql/data
|
|
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"pg_isready -U tiptop_preprod -d the_tip_top_preprod"
|
|
]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
networks:
|
|
- tiptop-preprod
|
|
|
|
backend:
|
|
image: ${REGISTRY}/the-tip-top/backend:${IMAGE_TAG}
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
environment:
|
|
PORT: 5000
|
|
NODE_ENV: preproduction
|
|
DATABASE_URL: postgresql://tiptop_preprod:tiptop_preprod_password@postgres:5432/the_tip_top_preprod
|
|
JWT_SECRET: preprod_secret_change_me
|
|
APP_URL: http://192.168.1.23:5002
|
|
MAIL_HOST: smtp.gmail.com
|
|
MAIL_PORT: 587
|
|
MAIL_USER: ""
|
|
MAIL_PASS: ""
|
|
MAIL_FROM: "The Tip Top Preprod <no-reply@tiptop.local>"
|
|
|
|
command: >
|
|
sh -c "
|
|
npx prisma migrate deploy &&
|
|
npm run init:db &&
|
|
npm start
|
|
"
|
|
|
|
ports:
|
|
- "5002:5000"
|
|
|
|
networks:
|
|
- tiptop-preprod
|
|
|
|
frontend:
|
|
image: ${REGISTRY}/the-tip-top/frontend:${IMAGE_TAG}
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
- backend
|
|
|
|
ports:
|
|
- "5174:80"
|
|
|
|
networks:
|
|
- tiptop-preprod
|
|
|
|
volumes:
|
|
tiptop_preprod_postgres_data:
|
|
name: tiptop_preprod_postgres_data
|
|
|
|
networks:
|
|
tiptop-preprod:
|
|
name: tiptop-preprod
|