-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (39 loc) · 1.07 KB
/
docker-compose.yml
File metadata and controls
46 lines (39 loc) · 1.07 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
services:
onwatch:
build:
context: .
dockerfile: Dockerfile
args:
VERSION: ${VERSION:-dev}
BUILD_TIME: ${BUILD_TIME:-}
image: onwatch:latest
container_name: onwatch
# Port mapping: host:container
ports:
- "${ONWATCH_PORT:-9211}:9211"
# Volume mount for persistent SQLite database
# Bind mount - pre-create with: mkdir -p ./onwatch-data && chown -R 65532:65532 ./onwatch-data
volumes:
- ./onwatch-data:/data
# Environment variables from .env file
env_file:
- .env
# Override specific environment variables for Docker
environment:
# Force foreground mode in Docker (logs to stdout)
ONWATCH_DB_PATH: /data/onwatch.db
# Restart policy
restart: unless-stopped
# Resource limits (optional but recommended for background services)
deploy:
resources:
limits:
memory: 64M
reservations:
memory: 32M
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"