-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (34 loc) · 1.24 KB
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (34 loc) · 1.24 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
# Easiest way to run the agent: `docker compose up -d`.
#
# This runs in polling mode (the default), so it needs no public URL and the
# in-process scheduler handles reminders. Just fill in .env first. The named
# volume keeps sessions and the schedule across restarts.
services:
fitcoach:
build: .
env_file: .env
environment:
# Polling mode: always-on, no public URL needed. This is the simple path.
MODE: polling
SESSION_FILE: /data/sessions.json
SCHEDULE_FILE: /data/schedule.json
volumes:
- fitcoach-data:/data
# Optional: expose the health check. Not required for the bot to work.
ports:
- "8080:8080"
healthcheck:
# The app serves /healthz; use node (already in the image) so we need no
# extra tools like curl. Marks the container unhealthy if the bot stops
# responding, which lets an orchestrator restart or alert on it.
test:
["CMD", "node", "-e", "fetch('http://127.0.0.1:8080/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
# Keep a runaway from eating the host; tune to your box.
mem_limit: 1g
restart: unless-stopped
volumes:
fitcoach-data: