Skip to content

Commit d53c1f9

Browse files
fix: remove env, change timezone
1 parent a6f457f commit d53c1f9

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

templates/compose/keycloak-with-postgres.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ services:
1212
environment:
1313
- PUID=1000
1414
- PGID=1000
15-
- TZ=Europe/Berlin
16-
- KEYCLOAK_ADMIN=${KEYCLOAK_ADMIN:-admin}
17-
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD:-password}
15+
- TZ=${TIMEZONE:-UTC}
16+
- KEYCLOAK_ADMIN=${SERVICE_USER_ADMIN}
17+
- KEYCLOAK_ADMIN_PASSWORD=${SERVICE_PASSWORD_ADMIN}
1818
- KC_DB=postgres
1919
- KC_DB_USERNAME=${SERVICE_USER_DATABASE}
2020
- KC_DB_PASSWORD=${SERVICE_PASSWORD_64_DATABASE}
2121
- KC_DB_URL_PORT=5432
2222
- KC_DB_URL=jdbc:postgresql://postgres/${POSTGRESQL_DATABASE:-keycloak}
2323
- KC_HOSTNAME=${SERVICE_FQDN_KEYCLOAK_8080}
24-
- KC_ENABLE_HTTPS=false
2524
- KC_HTTP_ENABLED=true
2625
- KC_HEALTH_ENABLED=true
2726
- KC_DB_POOL_INITIAL_SIZE=${KEYCLOAK_DB_POOL_INITIAL_SIZE}
@@ -37,7 +36,11 @@ services:
3736
postgres:
3837
condition: service_healthy
3938
healthcheck:
40-
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000;echo -e 'GET /health/ready HTTP/1.1\r\nhost: http://localhost\r\nConnection: close\r\n\r\n' >&3;if [ $? -eq 0 ]; then echo 'Healthcheck Successful';exit 0;else echo 'Healthcheck Failed';exit 1;fi;"]
39+
test:
40+
[
41+
"CMD-SHELL",
42+
"exec 3<>/dev/tcp/127.0.0.1/9000;echo -e 'GET /health/ready HTTP/1.1\r\nhost: http://localhost\r\nConnection: close\r\n\r\n' >&3;if [ $? -eq 0 ]; then echo 'Healthcheck Successful';exit 0;else echo 'Healthcheck Failed';exit 1;fi;",
43+
]
4144
interval: 5s
4245
timeout: 20s
4346
retries: 10

templates/compose/keycloak.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ services:
1212
environment:
1313
- PUID=1000
1414
- PGID=1000
15-
- TZ=Europe/Berlin
16-
- KEYCLOAK_ADMIN=${KEYCLOAK_ADMIN:-admin}
17-
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD:-password}
15+
- TZ=${TIMEZONE:-UTC}
16+
- KEYCLOAK_ADMIN=${SERVICE_USER_ADMIN}
17+
- KEYCLOAK_ADMIN_PASSWORD=${SERVICE_PASSWORD_ADMIN}
1818
- KC_HOSTNAME=${SERVICE_FQDN_KEYCLOAK_8080}
19-
- KC_ENABLE_HTTPS=false
2019
- KC_HTTP_ENABLED=true
2120
- KC_HEALTH_ENABLED=true
2221
- KC_DB_POOL_INITIAL_SIZE=${KEYCLOAK_DB_POOL_INITIAL_SIZE}
@@ -29,7 +28,11 @@ services:
2928
volumes:
3029
- keycloak-data:/opt/keycloak/data
3130
healthcheck:
32-
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000;echo -e 'GET /health/ready HTTP/1.1\r\nhost: http://localhost\r\nConnection: close\r\n\r\n' >&3;if [ $? -eq 0 ]; then echo 'Healthcheck Successful';exit 0;else echo 'Healthcheck Failed';exit 1;fi;"]
31+
test:
32+
[
33+
"CMD-SHELL",
34+
"exec 3<>/dev/tcp/127.0.0.1/9000;echo -e 'GET /health/ready HTTP/1.1\r\nhost: http://localhost\r\nConnection: close\r\n\r\n' >&3;if [ $? -eq 0 ]; then echo 'Healthcheck Successful';exit 0;else echo 'Healthcheck Failed';exit 1;fi;",
35+
]
3336
interval: 5s
3437
timeout: 20s
3538
retries: 10

0 commit comments

Comments
 (0)