services:
umami:
image: ghcr.io/umami-software/umami:postgresql-latest
container_name: umami
restart: unless-stopped
depends_on:
umami-db:
condition: service_healthy
environment:
DATABASE_URL: postgresql://数据库用户名:数据库密码@umami-db:5432/umami
DATABASE_TYPE: postgresql
APP_SECRET: F8uzofA8IQVoq6e58c8qfQLuIwOA32UsgQs021GUCLDGiBcHKenojSMPQS7JzuJk
ports:
- "33593:3000"
umami-db:
image: postgres:15.4
container_name: umami-db
restart: unless-stopped
environment:
POSTGRES_USER: 数据库用户名
POSTGRES_PASSWORD: 数据库密码
POSTGRES_DB: umami
volumes:
- ./data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U 数据库用户名 -d umami"]
interval: 10s
timeout: 5s
retries: 5以上数据库用户名和数据库密码 都要更改
有一个大坑:不要设置时区,不要设置时区,不要设置时区
cd /opt/umami
rm -rf /opt/umami/data
docker compose down
docker compose up
默认登陆用户和密码
admin umami