compose/umami/docker-compose.yaml
2025-05-18 21:20:49 +08:00

35 lines
955 B
YAML

services:
umami:
image: ghcr.io/umami-software/umami:postgresql-v2.18.1
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://umami:${POSTGRES_PASSWORD:-umami}@postgres:5432/umami
DATABASE_TYPE: postgresql
APP_SECRET: ${APP_SECRET}
init: true
restart: always
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:3000/api/heartbeat"]
interval: 5s
timeout: 5s
retries: 5
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17.5
container_name: postgres
restart: always
environment:
POSTGRES_DB: umami
POSTGRES_USER: umami
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-umami}
volumes:
- ${DATA_DIR:-./data}/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5