feat: add umami service and database to docker-compose for analytics integration
This commit is contained in:
parent
366e17185c
commit
5d781ee29f
1 changed files with 51 additions and 0 deletions
|
|
@ -211,6 +211,57 @@ services:
|
|||
tiles:
|
||||
condition: service_healthy
|
||||
|
||||
umami-db:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
POSTGRES_DB: umamidb
|
||||
POSTGRES_USER: umami_user
|
||||
POSTGRES_PASSWORD: umami_pw
|
||||
volumes:
|
||||
- umami-db-data:/var/lib/postgresql/data
|
||||
restart: always
|
||||
networks:
|
||||
- dokploy-network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U umami_user -d umamidb"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
umami:
|
||||
image: ghcr.io/umami-software/umami:postgresql-latest
|
||||
expose:
|
||||
- 3000
|
||||
environment:
|
||||
DATABASE_URL: postgresql://umami_user:umami_pw@umami-db:5432/umamidb
|
||||
APP_SECRET: ${UMAMI_APP_SECRET}
|
||||
depends_on:
|
||||
umami-db:
|
||||
condition: service_healthy
|
||||
restart: always
|
||||
init: true
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl http://localhost:3000/api/heartbeat"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- dokploy-network
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# HTTP ROUTER
|
||||
- "traefik.http.routers.umami-http.rule=Host(`analytics.${DOMAIN}.it`)"
|
||||
- "traefik.http.routers.umami-http.entrypoints=web"
|
||||
- "traefik.http.routers.umami-http.service=umami-http"
|
||||
- "traefik.http.routers.umami-http.middlewares=redirect-to-https@file"
|
||||
- "traefik.http.services.umami-http.loadbalancer.server.port=3000"
|
||||
# HTTPS ROUTER
|
||||
- "traefik.http.routers.umami.rule=Host(`analytics.${DOMAIN}.it`)"
|
||||
- "traefik.http.routers.umami.entrypoints=websecure"
|
||||
- "traefik.http.routers.umami.service=umami"
|
||||
- "traefik.http.routers.umami.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.umami.loadbalancer.server.port=3000"
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue