From 495d77a9ba6443518ef5536db740ce4ebfa8f620 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 2 May 2022 17:10:49 +0700 Subject: [PATCH] add umami to production --- .gitignore | 1 + docker-compose_production.yml | 23 +++++++++++++++++++++++ env/umami.sample.env | 6 ++++++ tubearchivist/web/templates/home.html | 1 + 4 files changed, 31 insertions(+) create mode 100644 env/umami.sample.env diff --git a/.gitignore b/.gitignore index c60b7ce..d9df79e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ config.json postgres.env tubearchivist.env +umami.env # example hooks docker-hook.json diff --git a/docker-compose_production.yml b/docker-compose_production.yml index e164dde..d01d3a4 100644 --- a/docker-compose_production.yml +++ b/docker-compose_production.yml @@ -54,3 +54,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.tubearchivist.com + - LETSENCRYPT_HOST=www.stats.tubearchivist.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/tubearchivist/web/templates/home.html b/tubearchivist/web/templates/home.html index 5719c4e..04f0efe 100644 --- a/tubearchivist/web/templates/home.html +++ b/tubearchivist/web/templates/home.html @@ -11,6 +11,7 @@ +