-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose.yml.template
64 lines (62 loc) · 1.3 KB
/
docker-compose.yml.template
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
version: "3.8"
services:
postgres:
restart: always
image: postgres:15-alpine
container_name: "postgres"
environment:
POSTGRES_MULTIPLE_DATABASES: ogiroid,dashboard
POSTGRES_PASSWORD: password
replace with password
POSTGRES_USER: ogiroid
networks:
- postgres
ports:
- 5432:5432
volumes:
- ./pg-init-scripts/create-multi-pg.sh:/docker-entrypoint-initdb.d/create-multi-pg.sh
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ogiroid"]
interval: 2s
timeout: 1s
retries: 5
bot:
links:
- postgres
restart: unless-stopped
build:
context: Bot
volumes:
- ./Bot:/bot:ro
tty: true
networks:
- postgres
depends_on:
- postgres
dashboard:
restart: unless-stopped
build:
context: Dashboard
ports:
- 4000:4000
links:
- caddy
- postgres
- bot
caddy:
image: caddy:2.7.6-alpine
restart: always
cap_add:
- NET_ADMIN
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
volumes:
postgres-data: # allow data to persist in docker managed dir
networks:
postgres: # postgres <-> bot
web: # bot <-> web