dc-umami/docker-compose.yml

33 lines
1.3 KiB
YAML

services:
umami:
image: ghcr.io/umami-software/umami:postgresql-v2.17.0@sha256:837eb91c54200f6f087e5c21d5f050ceb3b659eed49af91402dac04dd53bbac1
environment:
DATABASE_URL: postgresql://${DC_UMAMI_PG_USR:?}:${DC_UMAMI_PG_PASS:?}@${DC_UMAMI_PG_HOST:-db}:${DC_UMAMI_PG_PORT:-5432}/${DC_UMAMI_PG_DB:?}
DATABASE_TYPE: postgresql
APP_SECRET: ${DC_UMAMI_APP_SECRET:?}
init: true
restart: always
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:3000/api/heartbeat"]
interval: 5s
timeout: 5s
retries: 5
labels:
- "traefik.enable=true"
- "traefik.http.routers.umami.rule=Host(`${DC_UMAMI_HOSTNAME:?}`)"
- "traefik.http.routers.umami.entrypoints=websecure"
- "traefik.http.services.umami.loadbalancer.server.port=3000"
- "traefik.http.middlewares.umami-headers.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.middlewares.umami-headers.headers.customrequestheaders.X-Real-IP={{.Request.RemoteAddr}}"
- "traefik.http.routers.umami.middlewares=umami-headers@docker"
networks:
- traefik
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "3"
networks:
traefik:
external: true # This connects to the external network used by Traefik