diff --git a/.gitignore b/.gitignore index 1cb234b..6fc652d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ config.h # env files postgres.env +umami.env # frontend font files *.ttf diff --git a/docker-compose.yml b/docker-compose.yml index 6f03d50..96dfb04 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -59,3 +59,26 @@ services: - ./env/postgres.env expose: - "5432" + # umami stats + umami: + image: ghcr.io/mikecao/umami:postgresql-latest + container_name: umami + expose: + - "3000" + env_file: + - ./env/umami.env + environment: + - VIRTUAL_HOST=www.stats.lpb-air.com + - LETSENCRYPT_HOST=www.stats.lpb-air.com + depends_on: + - umami-db + restart: always + umami-db: + image: postgres:14 + container_name: umami-db + env_file: + - ./env/umami.env + volumes: + - ./volume/umami/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro + - ./volume/umami/db:/var/lib/postgresql/data + restart: always diff --git a/env/umami.sample.env b/env/umami.sample.env new file mode 100644 index 0000000..4ebda86 --- /dev/null +++ b/env/umami.sample.env @@ -0,0 +1,6 @@ +DATABASE_URL=postgresql://url +DATABASE_TYPE=postgresql +HASH_SALT=xxxxxxxxxxxxx +POSTGRES_DB=umami +POSTGRES_USER=umami +POSTGRES_PASSWORD=yyyyyyyyyyyyy \ No newline at end of file diff --git a/web/templates/layout.html b/web/templates/layout.html index 4510ae0..be4f0cd 100644 --- a/web/templates/layout.html +++ b/web/templates/layout.html @@ -13,6 +13,7 @@ +