-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (63 loc) · 1.48 KB
/
docker-compose.yml
File metadata and controls
67 lines (63 loc) · 1.48 KB
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
services:
web:
image: ghcr.io/nelsondane/sponsors-bot-web:latest
# build:
# context: .
# dockerfile: Dockerfile.web
container_name: web
restart: always
volumes:
- ./config.yaml:/app/config.yaml
ports:
- 8080:8080
depends_on:
- db
- bot
cloudflare:
image: cloudflare/cloudflared:latest
container_name: cloudflare
restart: always
command: tunnel run --token ${CLOUDFLARE_TOKEN}
bot:
image: ghcr.io/nelsondane/sponsors-bot:latest
# build:
# context: .
# dockerfile: Dockerfile.bot
# platform: linux/amd64
container_name: bot
restart: always
volumes:
- ./config.yaml:/app/config.yaml
depends_on:
- db
db:
image: postgres:17
container_name: db
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=sponsors
volumes:
- ./db:/var/lib/postgresql/data
ports:
- 5432:5432
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d sponsors -U ${POSTGRES_USER}" ]
interval: 30s
timeout: 10s
retries: 5
watchtower:
image: containrrr/watchtower
container_name: watchtower
hostname: watchtower
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_INCLUDE_STOPPED=true
- WATCHTOWER_POLL_INTERVAL=3600
command:
- bot
- web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always