keycloak-collective-portal/compose.yml

52 lines
1.3 KiB
YAML

---
version: "3.8"
services:
web:
image: nginx:1.21.0
environment:
- STACK_NAME=${STACK_NAME}
- DOMAIN=${DOMAIN}
configs:
- source: nginx_conf
target: /etc/nginx/nginx.conf
networks:
- proxy
- internal
deploy:
update_config:
failure_action: rollback
labels:
- "traefik.enable=true"
- "traefik.http.services.kcp.loadbalancer.server.port=80"
- "traefik.http.routers.kcp.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.kcp.entrypoints=web-secure"
- "traefik.http.routers.kcp.tls.certresolver=production"
app:
image: "decentral1se/keycloak-collective-portal:latest"
networks:
- internal
configs:
- source: entrypoint_sh
target: /usr/local/bin/entrypoint.sh
mode: 0555
entrypoint: /usr/local/bin/entrypoint.sh
command: "uvicorn --host 0.0.0.0 keycloak_collective_portal:app"
networks:
proxy:
external: true
internal:
internal: true
configs:
nginx_conf:
name: ${STACK_NAME}_nginx_conf_${NGINX_CONF_VERSION}
file: nginx.conf.tmpl
template_driver: golang
entrypoint_sh:
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang