forked from gretel/meshgram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (49 loc) · 2.01 KB
/
docker-compose.yml
File metadata and controls
50 lines (49 loc) · 2.01 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
services:
meshgram-plus:
build:
context: .
dockerfile: Dockerfile
container_name: meshgram-plus
# Ensure the bot restarts automatically unless stopped
restart: unless-stopped
# Load environment variables (for ${TELEGRAM_BOT_TOKEN}, ${OPENAI_API_KEY}, etc.)
env_file:
- .env
# Environment variables can be used inside config via envyaml (${VAR})
#environment:
# Example: provide Telegram token and chat ID via env vars (optional)
# TELEGRAM_BOT_TOKEN: "your-token"
# TELEGRAM_CHAT_ID: "123456"
# Example: override AI base URL or keys
# OPENAI_API_KEY: "..."
# OLLAMA_BASE_URL: "http://host.docker.internal:11434"
# Mount config and persist state databases (without masking app code)
volumes:
# Mount your entire config directory (recommended for split config files)
- ./config/:/app/config/:ro
# Persist SQLite databases and logs (app now uses /app/data/*)
- ./data/:/app/data/
# Mount source for live development
- ./src:/app/src:rw
# Serial device access: set one of the following based on your setup
devices:
# Map your serial device from the host into the container. Adjust as needed.
# Prefer stable by-id paths when available, e.g. /dev/serial/by-id/usb-*
- "/dev/ttyUSB0:/dev/ttyUSB0"
- "/dev/ttyACM0:/dev/ttyACM0"
# Security note: privileged is not required; keep minimal caps
# If you face permission issues, consider adding the container user to the same group as the device
# or run with --device-cgroup-rule (Docker Engine) rather than privileged.
# Command: default config loader auto-discovers YAMLs in /app/config
command: ["python", "src/meshgram.py"]
# Enable docker compose watch for live-reload during development
develop:
watch:
- path: ./src
action: restart
- path: ./config
action: restart
- path: ./requirements.txt
action: rebuild
- path: ./Dockerfile
action: rebuild