Skip to content

Commit d96e167

Browse files
author
Maximilian Csuk
committed
Simplification of environment variables
1 parent 5794bb4 commit d96e167

File tree

2 files changed

+13
-27
lines changed

2 files changed

+13
-27
lines changed

.env

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,23 @@ frontend_image=ghcr.io/max-bytes/omnikeeper/variants/frontend/internal
22
frontend_tag=latest
33
backend_image=ghcr.io/max-bytes/omnikeeper/variants/backend/internal
44
backend_tag=latest
5-
http_port=9080
5+
6+
http_port_frontend=9080
67
http_port_backend=9090
8+
79
url_omnikeeper=http://localhost
8-
aspnetcore_environment=Production
10+
911
db_user=postgres
1012
db_password=postgres
1113
db_database=omnikeeper
1214
db_management_port=4543
13-
authentication_audience=landscape-omnikeeper
14-
authentication_authority=https://auth-dev.mhx.at/auth/realms/acme
15-
#keycloak_url=https://auth-dev.mhx.at
16-
#keycloak_realm=acme
17-
#keycloak_clientid=landscape-omnikeeper
18-
#keycloak_clientsecret=
15+
1916
#keycloak_url=https://keycloak:9095
2017
keycloak_url=https://auth-dev.mhx.at
18+
keycloak_client=landscape-omnikeeper
2119
keycloak_realm=acme
22-
keycloak_clientid=landscape-omnikeeper
23-
keycloak_clientsecret=
2420
keycloak_port=9095
21+
2522
http_port_dbadmin=9099
2623
pgadmin_email=abc@abc.com
2724
pgadmin_password=123123

docker-compose.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ services:
33
frontend:
44
image: ${frontend_image}:${frontend_tag}
55
ports:
6-
- ${http_port}:80
6+
- ${http_port_frontend}:80
77
volumes:
88
- ./logs/frontend/nginx:/var/log/nginx
99
environment:
10-
NODE_ENV: production
11-
PUBLIC_URL_DYNAMIC: ${url_omnikeeper}:${http_port}
12-
REACT_APP_BASE_NAME: /
13-
REACT_APP_KEYCLOAK_URL: ${keycloak_url}/auth/
10+
PUBLIC_URL_DYNAMIC: ${url_omnikeeper}:${http_port_frontend}
11+
REACT_APP_KEYCLOAK_URL: ${keycloak_url}
1412
REACT_APP_KEYCLOAK_REALM: ${keycloak_realm}
15-
REACT_APP_KEYCLOAK_RESOURCE: ${keycloak_realm}
1613
REACT_APP_KEYCLOAK_CLIENT_ID: landscape-omnikeeper
1714
REACT_APP_BACKEND_URL: ${url_omnikeeper}:${http_port_backend}
1815
depends_on:
@@ -25,19 +22,11 @@ services:
2522
volumes:
2623
- ./logs/backend:/app/Logs
2724
environment:
28-
- ASPNETCORE_ENVIRONMENT=${aspnetcore_environment}
29-
- ASPNETCORE_URLS=http://+:80
30-
- DOTNET_RUNNING_IN_CONTAINER=true
3125
- ConnectionStrings__LandscapeDatabaseConnection=Server=db;User Id=${db_user};Password=${db_password};Database=${db_database};Pooling=true
3226
- ConnectionStrings__HangfireConnection=Server=db;User Id=${db_user};Password=${db_password};Database=${db_database};Pooling=true
33-
- Authentication__Audience=${authentication_audience}
34-
- Authentication__Authority=${authentication_authority}
35-
- Keycloak__URL=${keycloak_url}
36-
- Keycloak__Realm=${keycloak_realm}
37-
- Keycloak__ClientID=${keycloak_clientid}
38-
- Keycloak__ClientSecret=${keycloak_clientsecret}
39-
- CORS__AllowedHosts=${url_omnikeeper}:${http_port}
40-
- BaseURL=
27+
- Authentication__Audience=${keycloak_client}
28+
- Authentication__Authority=${keycloak_url}/auth/realms/${keycloak_realm}
29+
- CORS__AllowedHosts=${url_omnikeeper}:${http_port_frontend}
4130

4231
depends_on:
4332
- db

0 commit comments

Comments
 (0)