keycloak-collective-portal/compose.yml

77 lines
1.9 KiB
YAML
Raw Normal View History

2021-06-11 11:36:21 +00:00
---
version: "3.8"
services:
app:
2021-06-11 11:40:49 +00:00
image: "decentral1se/keycloak-collective-portal:latest"
2021-06-11 14:03:03 +00:00
environment:
2021-06-11 16:36:49 +00:00
- APP_SECRET_KEY_FILE=/run/secrets/app_secret_key
2021-06-13 10:20:32 +00:00
- APP_THEME
- INVITE_TIME_LIMIT
2021-06-11 14:03:03 +00:00
- KEYCLOAK_CLIENT_ID
2021-06-11 14:15:39 +00:00
- KEYCLOAK_CLIENT_SECRET_FILE=/run/secrets/keycloak_client_secret
2021-06-11 14:03:03 +00:00
- KEYCLOAK_DOMAIN
2021-06-11 14:54:03 +00:00
- KEYCLOAK_REALM
2021-06-13 10:20:32 +00:00
- REDIS_DB=0
- REDIS_HOST=cache
- REDIS_PORT=6379
2021-06-11 14:03:03 +00:00
secrets:
- app_secret_key
- keycloak_client_secret
2021-06-11 11:36:21 +00:00
networks:
2021-06-13 10:09:05 +00:00
- proxy
2021-06-13 10:20:32 +00:00
- internal
2021-06-11 11:40:49 +00:00
configs:
- source: entrypoint_sh
target: /usr/local/bin/entrypoint.sh
mode: 0555
entrypoint: /usr/local/bin/entrypoint.sh
2021-06-13 10:20:32 +00:00
healthcheck:
test: curl --fail 0.0.0.0:8000/healthz || exit 1
2021-06-13 10:09:05 +00:00
deploy:
update_config:
failure_action: rollback
2021-06-13 10:20:32 +00:00
order: start-first
2021-06-13 10:09:05 +00:00
labels:
- "traefik.enable=true"
- "traefik.http.services.kcp.loadbalancer.server.port=8000"
- "traefik.http.routers.kcp.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.kcp.entrypoints=web-secure"
- "traefik.http.routers.kcp.tls.certresolver=production"
2021-06-11 16:55:01 +00:00
command: |
uvicorn
--host 0.0.0.0
2021-06-11 17:16:52 +00:00
--forwarded-allow-ips="*"
2021-06-11 17:05:20 +00:00
--proxy-headers
2021-06-13 10:20:32 +00:00
keycloak_collective_portal.main:app
cache:
image: redis:6.2-alpine
networks:
- internal
healthcheck:
test: redis-cli ping
volumes:
- redis:/data
2021-06-11 11:36:21 +00:00
networks:
proxy:
external: true
2021-06-13 10:20:32 +00:00
internal:
2021-06-11 11:40:49 +00:00
configs:
entrypoint_sh:
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
2021-06-11 14:03:03 +00:00
secrets:
app_secret_key:
external: true
name: ${STACK_NAME}_app_secret_key_${SECRET_APP_SECRET_KEY}
keycloak_client_secret:
external: true
name: ${STACK_NAME}_keycloak_client_secret_${SECRET_KEYCLOAK_CLIENT_SECRET}
2021-06-13 10:20:32 +00:00
volumes:
redis: