63 lines
2 KiB
YAML
63 lines
2 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:?}@db:5432/${DC_UMAMI_PG_DB:?}
|
|
DATABASE_TYPE: postgresql
|
|
APP_SECRET: ${DC_UMAMI_APP_SECRET:?}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
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:?}`)" # replace this!
|
|
- "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:
|
|
- umami
|
|
- traefik
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "3"
|
|
|
|
db:
|
|
image: postgres:17.4@sha256:fe3f571d128e8efadcd8b2fde0e2b73ebab6dbec33f6bfe69d98c682c7d8f7bd
|
|
environment:
|
|
POSTGRES_DB: ${DC_UMAMI_PG_DB:?}
|
|
POSTGRES_USER: ${DC_UMAMI_PG_USR:?}
|
|
POSTGRES_PASSWORD: ${DC_UMAMI_PG_PASS:?}
|
|
volumes:
|
|
- db-data:/var/lib/postgresql/data
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- umami
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "100m"
|
|
max-file: "3"
|
|
|
|
volumes:
|
|
db-data:
|
|
|
|
networks:
|
|
traefik:
|
|
external: true # This connects to the external network used by Traefik
|
|
umami:
|