Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
51 lines (50 loc) · 2.27 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
51 lines (50 loc) · 2.27 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
name: capstan
services:
app:
build:
context: .
dockerfile: docker/Dockerfile
container_name: capstan
restart: unless-stopped
# entrypoint.sh ends in `exec gosu`, so the Go server is PID 1. Killed docker
# CLI children reparent to it and are never reaped; init: true adds a reaper.
init: true
# See docker-compose.prod.yaml's stop_grace_period comment: Docker's 10s
# default is shorter than the server's own graceful-shutdown budget
# (up to 15s HTTP drain + up to 30s backup drain — backupDrainTimeout in
# backend/cmd/server/main.go). 60s covers the ~45s worst case with margin
# (agent-os-7a5).
stop_grace_period: 60s
ports:
- "5001:5001"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# STACKS_DIR must be the same path inside and outside the container (see
# README "Volume Path Identity") — override via a root .env file or
# `STACKS_DIR=/my/path docker compose up`. Defaults to /opt/stacks,
# matching backend/internal/config/config.go's built-in default.
- ${STACKS_DIR:-/opt/stacks}:${STACKS_DIR:-/opt/stacks}
- ./keys:/app/keys:ro
- ./data:/app/data
environment:
- STACKS_DIR=${STACKS_DIR:-/opt/stacks}
- HOST_STACKS_DIR=${HOST_STACKS_DIR:-${STACKS_DIR:-/opt/stacks}}
- DATA_DIR=/app/data
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
# No proxy in dev; TRUSTED_NETWORKS unset = loopback only.
# Container timezone, which is the zone clock-time schedules run in:
# scheduled updates and backups fire against this clock, not the host's.
# Left at UTC, "03:00" in the UI means 03:00 UTC, so an operator in
# Europe/Amsterdam gets 05:00 local in summer and 04:00 in winter. Set it
# to your IANA zone (e.g. TZ=Europe/Amsterdam) in .env or the shell.
- TZ=${TZ:-UTC}
# Backup — optional env-var fallbacks; DB settings (Settings → Backup) take
# precedence at runtime. RESTIC_REPOSITORY defaults to /app/data/restic-repo
# which lives inside the ./data bind mount below.
# - RESTIC_REPOSITORY=/app/data/restic-repo
# - RESTIC_PASSWORD=change-me-use-settings-ui-instead
# - RCLONE_REMOTE=myremote
# - RCLONE_PATH=capstan-backups
env_file:
- ./backend/.env