new: add Umami

This commit is contained in:
2024-06-23 01:52:05 +00:00
parent 6494393821
commit aa2a56230d
2 changed files with 46 additions and 0 deletions

4
umami/.env.example Normal file
View File

@@ -0,0 +1,4 @@
SECRET=replace-me-with-a-random-string
DB=umami
USER=user
PASS=password

42
umami/compose.yml Normal file
View File

@@ -0,0 +1,42 @@
services:
umami:
container_name: umami
image: ghcr.io/umami-software/umami:postgresql-latest
environment:
DATABASE_URL: postgresql://$USER:$PASS@umami-db:5432/$DB
DATABASE_TYPE: postgresql
APP_SECRET: $SECRET
depends_on:
- umami-db
restart: unless-stopped
networks:
- umami
- proxy
labels:
# Caddy
caddy: "*.{$$INT_DOMAIN}"
caddy.1_@umami: host umami.{$$INT_DOMAIN}
caddy.1_handle: "@umami"
caddy.1_handle.reverse_proxy: "{{upstreams 3000}}"
# Get real client public IP if behind another proxy
# caddy.1_handle.reverse_proxy.header_up: X-Forwarded-For {header.X-Real-IP}
# Diun
diun.enable: true
umami-db:
container_name: umami-db
image: postgres:15-alpine
environment:
POSTGRES_DB: $DB
POSTGRES_USER: $USER
POSTGRES_PASSWORD: $PASS
volumes:
- ./appdb:/var/lib/postgresql/data
restart: unless-stopped
networks:
- umami
networks:
umami:
external: true
proxy:
external: true