generated from coop-cloud/example
Use redis, env vars and healthcheck
This commit is contained in:
parent
4244bffdb3
commit
fe411559ea
25
compose.yml
25
compose.yml
|
@ -6,23 +6,32 @@ services:
|
||||||
image: "decentral1se/keycloak-collective-portal:latest"
|
image: "decentral1se/keycloak-collective-portal:latest"
|
||||||
environment:
|
environment:
|
||||||
- APP_SECRET_KEY_FILE=/run/secrets/app_secret_key
|
- APP_SECRET_KEY_FILE=/run/secrets/app_secret_key
|
||||||
|
- APP_THEME
|
||||||
|
- INVITE_TIME_LIMIT
|
||||||
- KEYCLOAK_CLIENT_ID
|
- KEYCLOAK_CLIENT_ID
|
||||||
- KEYCLOAK_CLIENT_SECRET_FILE=/run/secrets/keycloak_client_secret
|
- KEYCLOAK_CLIENT_SECRET_FILE=/run/secrets/keycloak_client_secret
|
||||||
- KEYCLOAK_DOMAIN
|
- KEYCLOAK_DOMAIN
|
||||||
- KEYCLOAK_REALM
|
- KEYCLOAK_REALM
|
||||||
|
- REDIS_DB=0
|
||||||
|
- REDIS_HOST=cache
|
||||||
|
- REDIS_PORT=6379
|
||||||
secrets:
|
secrets:
|
||||||
- app_secret_key
|
- app_secret_key
|
||||||
- keycloak_client_secret
|
- keycloak_client_secret
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
- internal
|
||||||
configs:
|
configs:
|
||||||
- source: entrypoint_sh
|
- source: entrypoint_sh
|
||||||
target: /usr/local/bin/entrypoint.sh
|
target: /usr/local/bin/entrypoint.sh
|
||||||
mode: 0555
|
mode: 0555
|
||||||
entrypoint: /usr/local/bin/entrypoint.sh
|
entrypoint: /usr/local/bin/entrypoint.sh
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail 0.0.0.0:8000/healthz || exit 1
|
||||||
deploy:
|
deploy:
|
||||||
update_config:
|
update_config:
|
||||||
failure_action: rollback
|
failure_action: rollback
|
||||||
|
order: start-first
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.services.kcp.loadbalancer.server.port=8000"
|
- "traefik.http.services.kcp.loadbalancer.server.port=8000"
|
||||||
|
@ -34,11 +43,22 @@ services:
|
||||||
--host 0.0.0.0
|
--host 0.0.0.0
|
||||||
--forwarded-allow-ips="*"
|
--forwarded-allow-ips="*"
|
||||||
--proxy-headers
|
--proxy-headers
|
||||||
keycloak_collective_portal:app
|
keycloak_collective_portal.main:app
|
||||||
|
|
||||||
|
cache:
|
||||||
|
image: redis:6.2-alpine
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
healthcheck:
|
||||||
|
test: redis-cli ping
|
||||||
|
volumes:
|
||||||
|
- redis:/data
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
|
internal:
|
||||||
|
internal: true
|
||||||
|
|
||||||
configs:
|
configs:
|
||||||
entrypoint_sh:
|
entrypoint_sh:
|
||||||
|
@ -53,3 +73,6 @@ secrets:
|
||||||
keycloak_client_secret:
|
keycloak_client_secret:
|
||||||
external: true
|
external: true
|
||||||
name: ${STACK_NAME}_keycloak_client_secret_${SECRET_KEYCLOAK_CLIENT_SECRET}
|
name: ${STACK_NAME}_keycloak_client_secret_${SECRET_KEYCLOAK_CLIENT_SECRET}
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
redis:
|
||||||
|
|
Loading…
Reference in New Issue