110 lines
3.0 KiB
YAML
110 lines
3.0 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
POSTGRES_USER: tiptop_prod
|
|
POSTGRES_PASSWORD: tiptop_prod_password
|
|
POSTGRES_DB: the_tip_top_prod
|
|
|
|
volumes:
|
|
- tiptop_prod_postgres_data:/var/lib/postgresql/data
|
|
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U tiptop_prod -d the_tip_top_prod"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
networks:
|
|
- tiptop-prod
|
|
|
|
backend:
|
|
image: ${REGISTRY}/the-tip-top/backend:${IMAGE_TAG}
|
|
restart: unless-stopped
|
|
|
|
env_file:
|
|
- /opt/furious-ducks/secrets/tiptop-mail.env
|
|
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
environment:
|
|
PORT: 5000
|
|
NODE_ENV: production
|
|
DATABASE_URL: postgresql://tiptop_prod:tiptop_prod_password@postgres:5432/the_tip_top_prod
|
|
JWT_SECRET: prod_secret_change_me
|
|
<<<<<<< HEAD
|
|
APP_URL: https://api.dsp5-archi-o24a-4-5-g4.fr
|
|
API_PUBLIC_URL: https://api.dsp5-archi-o24a-4-5-g4.fr
|
|
=======
|
|
APP_URL: http://192.168.1.23:5003
|
|
FRONTEND_URL: http://192.168.1.23:5175
|
|
|
|
MAIL_HOST: smtp.gmail.com
|
|
MAIL_PORT: 587
|
|
MAIL_USER: ""
|
|
MAIL_PASS: ""
|
|
MAIL_FROM: "The Tip Top <no-reply@tiptop.local>"
|
|
>>>>>>> github/Emmanuel
|
|
|
|
# Injectés par le pipeline, jamais commités. Vides, les routes de
|
|
# connexion externe répondent 503 sans bloquer le démarrage.
|
|
GOOGLE_CLIENT_ID: "${GOOGLE_CLIENT_ID:-}"
|
|
GOOGLE_CLIENT_SECRET: "${GOOGLE_CLIENT_SECRET:-}"
|
|
FACEBOOK_APP_ID: "${FACEBOOK_APP_ID:-}"
|
|
FACEBOOK_APP_SECRET: "${FACEBOOK_APP_SECRET:-}"
|
|
|
|
command: >
|
|
sh -c "
|
|
npx prisma migrate deploy &&
|
|
npm run init:db &&
|
|
npm start
|
|
"
|
|
|
|
networks:
|
|
- tiptop-prod
|
|
- proxy
|
|
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=proxy"
|
|
- "traefik.http.routers.tiptop-prod-api.rule=Host(`api.dsp5-archi-o24a-4-5-g4.fr`)"
|
|
- "traefik.http.routers.tiptop-prod-api.entrypoints=websecure"
|
|
- "traefik.http.routers.tiptop-prod-api.tls=true"
|
|
- "traefik.http.routers.tiptop-prod-api.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.tiptop-prod-api.loadbalancer.server.port=5000"
|
|
|
|
frontend:
|
|
image: ${REGISTRY}/the-tip-top/frontend:${IMAGE_TAG}
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
|
- backend
|
|
|
|
networks:
|
|
- tiptop-prod
|
|
- proxy
|
|
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=proxy"
|
|
- "traefik.http.routers.tiptop-prod.rule=Host(`dsp5-archi-o24a-4-5-g4.fr`) || Host(`www.dsp5-archi-o24a-4-5-g4.fr`)"
|
|
- "traefik.http.routers.tiptop-prod.entrypoints=websecure"
|
|
- "traefik.http.routers.tiptop-prod.tls=true"
|
|
- "traefik.http.routers.tiptop-prod.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.tiptop-prod.loadbalancer.server.port=80"
|
|
|
|
volumes:
|
|
tiptop_prod_postgres_data:
|
|
name: tiptop_prod_postgres_data
|
|
|
|
networks:
|
|
tiptop-prod:
|
|
name: tiptop-prod
|
|
|
|
proxy:
|
|
external: true
|