Refactor Umami service in docker-compose: add umami-db service and configure database connection
This commit is contained in:
@@ -118,7 +118,10 @@ services:
|
||||
image: umamisoftware/umami:postgresql-latest
|
||||
container_name: umami
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- umami-db
|
||||
environment:
|
||||
DATABASE_URL: postgresql://umami:${UMAMI_DB_PASS}@umami-db:5432/umami
|
||||
APP_SECRET: ${UMAMI_APP_SECRET}
|
||||
TRACKER_SCRIPT_NAME: umami
|
||||
TZ: "${TZ}"
|
||||
@@ -131,6 +134,19 @@ services:
|
||||
- traefik.http.routers.umami.middlewares=security-headers
|
||||
- traefik.http.services.umami.loadbalancer.server.port=3000
|
||||
|
||||
umami-db:
|
||||
image: postgres:15-alpine
|
||||
container_name: umami-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: umami
|
||||
POSTGRES_USER: umami
|
||||
POSTGRES_PASSWORD: ${UMAMI_DB_PASS}
|
||||
TZ: "${TZ}"
|
||||
networks: [internal]
|
||||
volumes:
|
||||
- umami_db_data:/var/lib/postgresql/data
|
||||
|
||||
## ─────────────────────────────────────────────
|
||||
## Uptime Kuma — status page / checks
|
||||
## ─────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user