All is in .env
This commit is contained in:
16
.env
Normal file
16
.env
Normal file
@@ -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
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"PostgreSQL": "User ID=maxime;Password=S?$9<Sp5JTX4-aC4=8J*;Host=localhost;Port=15432;Database=GiecChallenge;"
|
||||
"PostgreSQL": "${ConnectionStrings__PostgreSQL}"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
@@ -9,11 +9,11 @@
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"OriginAllowed": "http://localhost:3000",
|
||||
"PasswordHash" : "U^CbUUV,$MMU]2lD$MFZ5;Bui#)XTS",
|
||||
"OriginAllowed": "${OriginAllowed}",
|
||||
"PasswordHash": "${PasswordHash}",
|
||||
"JWT": {
|
||||
"ValidAudience": "http://localhost:7021",
|
||||
"ValidIssuer": "http://localhost:7021",
|
||||
"Secret": "eAD+PhDIZ2(d2/<|,yvA/8'Z;[Wl|Z"
|
||||
"ValidAudience": "${JWT__ValidAudience}",
|
||||
"ValidIssuer": "${JWT__ValidIssuer}",
|
||||
"Secret": "${JWT__Secret}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"PostgreSQL": ""
|
||||
"PostgreSQL": "${ConnectionStrings__PostgreSQL}"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
@@ -8,12 +8,12 @@
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "",
|
||||
"OriginAllowed": "",
|
||||
"PasswordHash" : "",
|
||||
"AllowedHosts": "*",
|
||||
"OriginAllowed": "${OriginAllowed}",
|
||||
"PasswordHash": "${PasswordHash}",
|
||||
"JWT": {
|
||||
"ValidAudience": "",
|
||||
"ValidIssuer": "",
|
||||
"Secret": ""
|
||||
"ValidAudience": "${JWT__ValidAudience}",
|
||||
"ValidIssuer": "${JWT__ValidIssuer}",
|
||||
"Secret": "${JWT__Secret}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,13 +17,13 @@ services:
|
||||
context: .
|
||||
dockerfile: ./backend/GiecChallenge/Dockerfile
|
||||
environment:
|
||||
- ConnectionStrings__PostgreSQL=host=giecchallenge_db;User ID=maxime;Password=<POSTGREDB_PASSWORD>;Port=14432;Database=GiecChallenge;Pooling=true;
|
||||
- JWT__ValidAudience=https://giecchallenge-backend.maximeboulay.com
|
||||
- JWT__ValidIssuer=https://giecchallenge-backend.maximeboulay.com
|
||||
- JWT__Secret=<JWT__Secret>
|
||||
- PasswordHash=<HASH>
|
||||
- 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=<POSTGREDB_PASSWORD>
|
||||
- POSTGRES_USER=${POSTGRES_USER}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=GiecChallenge
|
||||
expose:
|
||||
- "14432"
|
||||
|
||||
Reference in New Issue
Block a user