-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
111 lines (105 loc) · 3.29 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: "2.1"
services:
traefik:
container_name: od-traefik
image: traefik:v2.3
restart: always
ports:
- "80:80"
- "443:443"
- "5300:5300"
volumes:
- ./letsencrypt:/letsencrypt
- ./traefik_config.yml:/traefik_config.yml
- /var/run/docker.sock:/var/run/docker.sock
command:
# - --api.debug=true
# - --log.level=DEBUG
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.file.filename=/traefik_config.yml
- --providers.file.watch=true
- --entrypoints.web.address=:80
- --entrypoints.web-proxy.address=:5300
- --entrypoints.web-shlink.address=:443
- --certificatesresolvers.mytlschallenge.acme.tlschallenge=true
- --certificatesresolvers.mytlschallenge.acme.email=oliver.franke@limebit.de
- --certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json
database:
container_name: od-database
image: docker.pkg.github.com/open-discourse/open-discourse/database:latest
restart: always
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 5
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
persistent_database:
container_name: od-persistent-database
image: postgres:12
restart: always
ports:
- "2345:5432"
volumes:
- ./persistent_database.sql:/persistent_database.sql
- ./persistent_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 5
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
proxy:
container_name: od-proxy
image: docker.pkg.github.com/open-discourse/open-discourse/proxy:latest
restart: always
depends_on:
database:
condition: service_healthy
persistent_database:
condition: service_healthy
environment:
- CACHE_EXPIRATION=100000
- QUERY_LIMIT=200
- ACCESS_KEY=${ACCESS_KEY}
- SECRET_KEY=${SECRET_KEY}
- ENDPOINT=${ENDPOINT}
- POSTGRES_DB_HOST=database
- POSTGRES_PERSISTENT_DB_HOST=persistent_database
- POSTGRES_PERSISTENT_DB_PORT=5432
labels:
- "traefik.enable=true"
- "traefik.http.routers.proxy.rule=Host(`api.opendiscourse.de`)"
- "traefik.http.routers.proxy.entrypoints=web-proxy"
- "traefik.http.routers.proxy.tls.certresolver=mytlschallenge"
shlink:
container_name: od-shlink
image: shlinkio/shlink:stable
restart: always
depends_on:
persistent_database:
condition: service_healthy
environment:
- SHORT_DOMAIN_HOST=api.opendiscourse.de
- SHORT_DOMAIN_SCHEMA=https
- GEOLITE_LICENSE_KEY=${GEOLITE}
- DB_DRIVER=postgres
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_HOST=persistent_database
- DISABLE_TRACKING=true
labels:
- "traefik.enable=true"
- "traefik.http.routers.shlink.rule=Host(`api.opendiscourse.de`)"
- "traefik.http.routers.shlink.entrypoints=web-shlink"
- "traefik.http.routers.shlink.tls.certresolver=mytlschallenge"