forked from knadh/listmonk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (57 loc) · 1.62 KB
/
docker-compose.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
services:
listmonk:
image: 'listmonk/listmonk:latest'
environment:
- SERVICE_FQDN_LISTMONK_9000
- 'LISTMONK_app__address=0.0.0.0:9000'
- LISTMONK_db__host=postgres
- LISTMONK_db__name=listmonk
- LISTMONK_db__user=$SERVICE_USER_POSTGRES
- LISTMONK_db__password=$SERVICE_PASSWORD_POSTGRES
- LISTMONK_db__port=5432
- TZ=Etc/UTC
labels:
- "traefik.http.middlewares.ipwhitelist.ipwhitelist.sourcerange=139.59.100.204/32,5.78.83.80/32"
volumes:
- 'listmonk-data:/listmonk/uploads'
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
- CMD
- wget
- '-q'
- '--spider'
- 'http://127.0.0.1:9000'
interval: 5s
timeout: 20s
retries: 10
listmonk-initial-database-setup:
image: 'listmonk/listmonk:latest'
command: './listmonk --install --yes --idempotent'
restart: 'no'
depends_on:
postgres:
condition: service_healthy
environment:
- LISTMONK_db__host=postgres
- LISTMONK_db__name=listmonk
- LISTMONK_db__user=$SERVICE_USER_POSTGRES
- LISTMONK_db__password=$SERVICE_PASSWORD_POSTGRES
- LISTMONK_db__port=5432
postgres:
image: 'postgres:latest'
environment:
- POSTGRES_DB=listmonk
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
- POSTGRES_USER=$SERVICE_USER_POSTGRES
volumes:
- 'pg-data:/var/lib/postgresql/data'
healthcheck:
test:
- CMD-SHELL
- 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'
interval: 5s
timeout: 20s
retries: 10