-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
listmonk.yml
63 lines (59 loc) · 1.71 KB
/
listmonk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# DOMAIN=example.com docker stack deploy -c listmonk.yml listmonk
services:
app:
image: listmonk/listmonk:${VERSION:-v4.1.0}
command:
- /bin/sh
- -c
- |
if [ "$$INSTALL" = "true" ]; then
./listmonk --install --yes
fi
rm config.toml
./listmonk --new-config
if [ "$$UPGRADE" = "true" ]; then
./listmonk --upgrade --yes
fi
./listmonk
environment:
- LISTMONK_app__address=0.0.0.0:9000
- LISTMONK_db__host=postgres
- LISTMONK_db__password=myp@ssw0rd
- POSTGRES_DB=listmonk
- POSTGRES_USER=listmonk
- POSTGRES_PASSWORD=myp@ssw0rd
- DB_HOST=postgres
- INSTALL=${INSTALL:-false}
- UPGRADE=${UPGRADE:-false}
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.listmonk-${NUMBER:-1}.rule=Host(`${DOMAIN:-listmonk.localhost}`)
- traefik.http.routers.listmonk-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.listmonk-${NUMBER:-1}.service=listmonk-${NUMBER:-1}
- traefik.http.routers.listmonk-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.listmonk-${NUMBER:-1}.loadbalancer.server.port=9000
networks:
- internal
- traefik
postgres:
image: postgres:12-alpine
environment:
- POSTGRES_DB=listmonk
- POSTGRES_USER=listmonk
- POSTGRES_PASSWORD=myp@ssw0rd
healthcheck:
test: ["CMD", "pg_isready", "-U", "listmonk"]
volumes:
- ${VOLUME_PATH}postgres:/var/lib/postgresql/data
networks:
- internal
volumes:
postgres:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net