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>
This commit is contained in:
3
backend/.gitignore
vendored
3
backend/.gitignore
vendored
@@ -2,4 +2,5 @@ node_modules/
|
||||
.env
|
||||
.prisma
|
||||
coverage/
|
||||
dist/
|
||||
dist/
|
||||
test-results/
|
||||
|
||||
6
backend/package-lock.json
generated
6
backend/package-lock.json
generated
@@ -610,9 +610,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@emnapi/wasi-threads": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz",
|
||||
"integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==",
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.3.tgz",
|
||||
"integrity": "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
|
||||
@@ -33,12 +33,20 @@ services:
|
||||
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 &&
|
||||
|
||||
@@ -38,12 +38,20 @@ services:
|
||||
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
|
||||
FRONTEND_URL: http://192.168.1.23:5174
|
||||
MAIL_HOST: smtp.gmail.com
|
||||
MAIL_PORT: 587
|
||||
MAIL_USER: ""
|
||||
MAIL_PASS: ""
|
||||
MAIL_FROM: "The Tip Top Preprod <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 &&
|
||||
|
||||
@@ -38,6 +38,7 @@ services:
|
||||
DATABASE_URL: postgresql://tiptop_prod:tiptop_prod_password@postgres:5432/the_tip_top_prod
|
||||
JWT_SECRET: prod_secret_change_me
|
||||
APP_URL: http://192.168.1.23:5003
|
||||
FRONTEND_URL: http://192.168.1.23:5175
|
||||
|
||||
MAIL_HOST: smtp.gmail.com
|
||||
MAIL_PORT: 587
|
||||
@@ -45,6 +46,13 @@ services:
|
||||
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 &&
|
||||
|
||||
Reference in New Issue
Block a user