add umami to production

This commit is contained in:
simon 2022-05-02 17:10:49 +07:00
parent 05a9630bd2
commit 495d77a9ba
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
4 changed files with 31 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
config.json
postgres.env
tubearchivist.env
umami.env
# example hooks
docker-hook.json

View File

@ -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

6
env/umami.sample.env vendored Normal file
View File

@ -0,0 +1,6 @@
DATABASE_URL=postgresql://url
DATABASE_TYPE=postgresql
HASH_SALT=xxxxxxxxxxxxx
POSTGRES_DB=umami
POSTGRES_USER=umami
POSTGRES_PASSWORD=yyyyyyyyyyyyy

View File

@ -11,6 +11,7 @@
<meta property="og:description" content="Your self hosted YouTube media server" />
<meta property="og:image" content="/static/img/banner-tube-archivist-dark.png" />
<script type="text/javascript" src="/static/script.js"></script>
<script async defer data-website-id="028c31cf-3e27-4f0f-8b7b-c938ac79b7dc" src="https://www.stats.tubearchivist.com/umami.js"></script>
</head>
<body>
<div class="content">