-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) · 2.39 KB
/
docker-compose.yml
File metadata and controls
99 lines (94 loc) · 2.39 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
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
# Bounty-bot Service - Docker Compose
# Port allocation: 3235 (Bounty-bot)
#
# Watchtower polls GHCR every 60s and auto-restarts on new images.
# CI pushes ghcr.io/platformnetwork/bounty-bot:latest on main.
services:
bounty-bot:
image: ghcr.io/platformnetwork/bounty-bot:latest
build:
context: .
dockerfile: Dockerfile
container_name: bounty-bot
restart: unless-stopped
env_file: .env
ports:
- "3235:3235"
environment:
- NODE_ENV=production
- PORT=3235
- DATA_DIR=/app/data
- REDIS_URL=redis://redis:6379
- ATLAS_WEBHOOK_URL=http://atlas-host:3230/webhooks
volumes:
- bounty-data:/app/data
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3235/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- platform-network
labels:
- "com.centurylinklabs.watchtower.enable=true"
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M
redis:
image: redis:7-alpine
container_name: bounty-redis
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes", "--maxmemory", "256mb", "--maxmemory-policy", "allkeys-lru"]
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
networks:
- platform-network
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 64M
watchtower:
image: containrrr/watchtower:latest
container_name: bounty-watchtower
restart: unless-stopped
environment:
- WATCHTOWER_POLL_INTERVAL=60
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_ROLLING_RESTART=true
- WATCHTOWER_INCLUDE_RESTARTING=true
- WATCHTOWER_REVIVE_STOPPED=true
- WATCHTOWER_LIFECYCLE_HOOKS=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json:ro
networks:
- platform-network
deploy:
resources:
limits:
memory: 128M
networks:
platform-network:
external: true
name: platform-network
volumes:
bounty-data:
name: bounty-bot-data
redis-data:
name: bounty-redis-data