tools/compose.yml
neil 21202c2ca3 Keep server details out of the repo; deploy target comes from HOST or .deploy.env
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 01:19:28 -08:00

33 lines
896 B
YAML

# Host networking + loopback bind: only a reverse proxy or tunnel connector on the
# same host can reach it (127.0.0.1:8090); nothing is exposed directly.
name: tools
services:
tools:
build: ./app
image: tools:latest
container_name: tools
restart: unless-stopped
network_mode: host
environment:
HOST: 127.0.0.1
PORT: "8090"
volumes:
- ./data:/data
# Small and capped, so it can share a small server with other workloads.
mem_limit: 192m
cpus: 0.5
read_only: true
tmpfs:
- /tmp
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8090/healthz', timeout=3)"]
interval: 30s
timeout: 5s
retries: 3
logging:
driver: json-file
options:
max-size: 5m
max-file: "2"