mirror of
https://github.com/PAPAMICA/docker-compose-collection.git
synced 2026-01-18 16:27:25 +01:00
72 lines
2.3 KiB
YAML
72 lines
2.3 KiB
YAML
# Maintainer: Mickael "PAPAMICA" Asseline
|
|
# Update: 2022-05-10
|
|
|
|
#& type: 3
|
|
#& title: umami
|
|
#& description: Light alternative to Google Analitycs
|
|
#& note: Website: <a href='https://umami.is/' target='_blank' rel='noopener'>Umami.is</a></br></br>Warning: RTFM ! You need to add one file and restart !
|
|
#& categories: SelfHosted, PAPAMICA
|
|
#& platform: linux
|
|
#& logo: https://img.papamica.com/logo/umami.png
|
|
|
|
#% SERVICE: Name of the service (No spaces or points) [umami]
|
|
#% DATA_LOCATION: Data localization (Example: /apps/service) [/_data/apps]
|
|
#% URL: Service URL (Example: service.papamica.fr or service.com)
|
|
#% NETWORK: Your Traefik network (Example: proxy) [proxy]
|
|
#% HASH_SALT: Generate encryption
|
|
|
|
# Work with Portainer
|
|
version: "3.3"
|
|
services:
|
|
postgres:
|
|
container_name: $SERVICE-db
|
|
image: postgres:14
|
|
volumes:
|
|
- $DATA_LOCATION/$SERVICE/db:/var/lib/postgresql/data
|
|
- $DATA_LOCATION/$SERVICE/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro
|
|
environment:
|
|
- POSTGRES_DB=umami
|
|
- POSTGRES_USER=$DB_USER
|
|
- POSTGRES_PASSWORD=$DB_PASSWORD
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
labels:
|
|
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
|
|
networks:
|
|
- default
|
|
|
|
umami:
|
|
image: ghcr.io/mikecao/umami:postgresql-latest
|
|
container_name: $SERVICE
|
|
restart: always
|
|
depends_on:
|
|
- postgres
|
|
healthcheck:
|
|
test: curl --fail http://localhost:3000 || exit 1
|
|
interval: 1m
|
|
timeout: 30s
|
|
retries: 3
|
|
environment:
|
|
- DATABASE_URL=postgresql://$DB_USER:$DB_PASSWORD@$SERVICE-db:5432/umami
|
|
- DATABASE_TYPE=postgresql
|
|
- HASH_SALT=$HASH_SALT
|
|
networks:
|
|
- default
|
|
labels:
|
|
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.$SERVICE.entrypoints=https"
|
|
- "traefik.http.routers.$SERVICE.rule=Host(`$URL`)"
|
|
- "traefik.http.routers.$SERVICE.tls=true"
|
|
- "traefik.http.routers.$SERVICE.tls.certresolver=http"
|
|
- "traefik.http.services.$SERVICE.loadbalancer.server.port=3000"
|
|
- "traefik.docker.network=$NETWORK"
|
|
|
|
networks:
|
|
default:
|
|
external:
|
|
name: $NETWORK |