From 5fc97febfbe42e2fe06c979fa2a8ae2c5991cd3d Mon Sep 17 00:00:00 2001 From: Maxime Boulay Date: Fri, 1 May 2026 14:25:03 +0200 Subject: [PATCH] All is in .env --- .DS_Store | Bin 6148 -> 6148 bytes .env | 16 ++++++++++++++++ backend/GiecChallenge/GiecChallenge.csproj | 2 +- .../appsettings.Development.json | 14 +++++++------- backend/GiecChallenge/appsettings.Docker.json | 16 ++++++++-------- docker-compose.yml | 18 +++++++++--------- 6 files changed, 41 insertions(+), 25 deletions(-) create mode 100644 .env diff --git a/.DS_Store b/.DS_Store index 54c541d16f4e50f070bdb027e1cc2db3df0d405f..ea94df58d00d788979a1c5896b12b3746f895a2e 100644 GIT binary patch delta 184 zcmZoMXfc@J&&ahgU^g=(*Jd7;dyMrQ3~3BS4EYRs3?&SyKr$sK-7q*gKevDZ2$aP2`@pt)n#Ucnt4krEP7GpcK?cH7ZH)$o$qU)kHuJJ2F>Yq( H_{$Ff$3rf) delta 32 ocmZoMXfc@J&&akhU^g=(+h!h?dyJc#*jgDUHq6+}&heKY0IhBc?*IS* diff --git a/.env b/.env new file mode 100644 index 0000000..171253f --- /dev/null +++ b/.env @@ -0,0 +1,16 @@ +# Backend configuration +ConnectionStrings__PostgreSQL=host=giecchallenge_db;User ID=${POSTGRES_USER};Password=${POSTGRES_PASSWORD};Port=14432;Database=GiecChallenge;Pooling=true +AllowedHosts=* +OriginAllowed=https://giecchallenge.maximeboulay.com +PasswordHash=${PasswordHash} +JWT__ValidAudience=https://giecchallenge-backend.maximeboulay.com +JWT__ValidIssuer=https://giecchallenge-backend.maximeboulay.com +JWT__Secret=${JWT__Secret} +POSTGRES_USER= +POSTGRES_PASSWORD= + +# Frontend configuration +REACT_APP_API_URL=https://giecchallenge-backend.maximeboulay.com + +# General environment +ASPNETCORE_ENVIRONMENT=Docker \ No newline at end of file diff --git a/backend/GiecChallenge/GiecChallenge.csproj b/backend/GiecChallenge/GiecChallenge.csproj index 48609f3..b0bf598 100644 --- a/backend/GiecChallenge/GiecChallenge.csproj +++ b/backend/GiecChallenge/GiecChallenge.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable diff --git a/backend/GiecChallenge/appsettings.Development.json b/backend/GiecChallenge/appsettings.Development.json index 1a5b6a5..e8f1790 100644 --- a/backend/GiecChallenge/appsettings.Development.json +++ b/backend/GiecChallenge/appsettings.Development.json @@ -1,6 +1,6 @@ { "ConnectionStrings": { - "PostgreSQL": "User ID=maxime;Password=S?$9;Port=14432;Database=GiecChallenge;Pooling=true; - - JWT__ValidAudience=https://giecchallenge-backend.maximeboulay.com - - JWT__ValidIssuer=https://giecchallenge-backend.maximeboulay.com - - JWT__Secret= - - PasswordHash= + - ConnectionStrings__PostgreSQL=${ConnectionStrings__PostgreSQL} + - JWT__ValidAudience=${JWT__ValidAudience} + - JWT__ValidIssuer=${JWT__ValidIssuer} + - JWT__Secret=${JWT__Secret} + - PasswordHash=${PasswordHash} - AllowedHosts=* - - OriginAllowed=https://giecchallenge.maximeboulay.com + - OriginAllowed=${OriginAllowed} networks: - dev @@ -40,7 +40,7 @@ services: context: . dockerfile: ./frontend/Dockerfile args: - REACT_APP_API_URL: https://giecchallenge-backend.maximeboulay.com + REACT_APP_API_URL: ${REACT_APP_API_URL} environment: - API_URL networks: @@ -50,8 +50,8 @@ services: image: postgres:latest container_name: giecchallenge_db environment: - - POSTGRES_USER=maxime - - POSTGRES_PASSWORD= + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_DB=GiecChallenge expose: - "14432"