Files
THE-TIP-TOP/deploy/dev/docker-compose.yml
Emma781227 8adf780da2 Variables de connexion externe dans les environnements Docker
Ajoute FRONTEND_URL, absent des trois environnements alors que le callback
OAuth et la liste d'origines CORS en dépendent : sans lui le backend
retombait sur localhost:5173 et refusait le front déployé.

Les identifiants Google et Facebook passent par substitution depuis
l'environnement du pipeline, afin de ne pas committer de secret.

Ignore aussi test-results/, généré par le reporter jest-junit ajouté par la
chaîne CI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 00:25:54 +02:00

84 lines
1.8 KiB
YAML

services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: tiptop
POSTGRES_PASSWORD: tiptop_dev_password
POSTGRES_DB: the_tip_top_db
volumes:
- tiptop_postgres_dev_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tiptop -d the_tip_top_db"]
interval: 10s
timeout: 5s
retries: 10
networks:
- tiptop-dev
backend:
image: ${REGISTRY}/the-tip-top/backend:${IMAGE_TAG}
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
PORT: 5000
DATABASE_URL: postgresql://tiptop:tiptop_dev_password@postgres:5432/the_tip_top_db
JWT_SECRET: dev_secret_change_me
APP_URL: http://192.168.1.23:5001
FRONTEND_URL: http://192.168.1.23:5173
MAIL_HOST: smtp.gmail.com
MAIL_PORT: 587
MAIL_USER: ""
MAIL_PASS: ""
MAIL_FROM: "The Tip Top <no-reply@tiptop.local>"
# 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
"
ports:
- "5001:5000"
networks:
- tiptop-dev
frontend:
image: ${REGISTRY}/the-tip-top/frontend:${IMAGE_TAG}
restart: unless-stopped
depends_on:
- backend
ports:
- "5173:80"
networks:
- tiptop-dev
volumes:
tiptop_postgres_dev_data:
external: true
name: the-tip-top_tiptop_postgres_dev_data
networks:
tiptop-dev:
name: tiptop-dev