traefik-rybbit-feeder/demo/docker-compose.yml
2025-03-31 19:09:13 +02:00

84 lines
2.1 KiB
YAML

services:
traefik:
image: traefik:3
depends_on:
- umami
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.rule=Host(`localhost`)"
- "traefik.http.routers.traefik.entrypoints=traefik"
networks:
- traefik
ports:
- target: 8080
published: 8080
protocol: tcp
- target: 8081
published: 8081
protocol: tcp
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
# To persist ACME data (certificates, account, etc)
- ./traefik.yml:/traefik.yml:ro
- ./config.yml:/config/config.yml:ro
# mount plugin
- ../:/plugins-local/src/github.com/astappiev/traefik-umami-feeder
restart: unless-stopped
whoami:
image: containous/whoami
ports:
- target: 80
published: 80
protocol: tcp
labels:
- "traefik.enable=true"
- "traefik.http.services.whoami.loadbalancer.server.port=80"
- "traefik.http.routers.whoami.service=whoami"
- "traefik.http.routers.whoami.rule=Host(`localhost`)"
- "traefik.http.routers.whoami.entrypoints=whoami"
# middleware
- "traefik.http.routers.whoami.middlewares=umami@file"
networks:
- traefik
umami:
image: ghcr.io/umami-software/umami:postgresql-latest
depends_on:
postgres:
condition: service_healthy
environment:
- DEBUG=umami:middleware
- ENABLE_TEST_CONSOLE=1
- DATABASE_URL=postgres://umami:umami@postgres:5432/umami
ports:
- target: 3000
published: 3000
protocol: tcp
networks:
- traefik
- umami_postgres
postgres:
image: postgres:16
environment:
- POSTGRES_PASSWORD=umami
- POSTGRES_DB=umami
- POSTGRES_USER=umami
networks:
- umami_postgres
volumes:
- ./postgres:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'" ]
interval: 10s
timeout: 3s
retries: 3
networks:
traefik:
umami_postgres: