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