Files
TrailBase-docker/docker-compose.root.yml
T
tajniak81andClaude Opus 5.5 8636d130a5 Add TB_DATA / TB_DATA_ROOT to choose depot storage
The depot mount is now ${TB_DATA:-traildepot} (rootless) and
${TB_DATA_ROOT:-traildepot} (root). The default keeps the named volume;
a host path (containing a "/") switches to a bind mount.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:45:05 +01:00

45 lines
1.6 KiB
YAML

# Root TrailBase (runs as root inside the container).
# Run: docker compose -f docker-compose.root.yml up -d
# A distinct project name keeps its container/volume separate from the rootless stack.
name: trailbase-root
services:
trailbase:
build:
context: .
dockerfile: Dockerfile.root
args:
# TrailBase version to bake into the image (see .env)
TB_VERSION: ${TB_VERSION:-0.36.1}
image: trailbase:${TB_VERSION:-0.36.1}-root
container_name: ${CONTAINER_NAME:-trailbase}-root
restart: unless-stopped
environment:
# server
TB_PORT: ${TB_PORT_ROOT:-4000}
TB_PUBLIC_URL: ${TB_PUBLIC_URL:-}
# admin bootstrap (checked/created by the entrypoint on every start)
TB_ADMIN_EMAIL: ${TB_ADMIN_EMAIL:-}
TB_ADMIN_PASSWORD: ${TB_ADMIN_PASSWORD:-}
RUST_BACKTRACE: "1"
# config overrides: any TRAIL_<FIELD_PATH> variable overrides config.textproto, e.g.
# TRAIL_SERVER_APPLICATION_NAME: "My App"
ports:
# host:container
- "${TB_PORT_ROOT:-4000}:${TB_PORT_ROOT:-4000}"
volumes:
# persist databases, config, uploads, secrets and backups
# TB_DATA_ROOT: named volume (default) or a host path such as ./traildepot-root (see .env)
- ${TB_DATA_ROOT:-traildepot}:/app/traildepot
# uncomment to develop migrations against the running instance
# - ./migrations:/app/traildepot/migrations
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:${TB_PORT_ROOT:-4000}/api/healthcheck || exit 1"]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
volumes:
traildepot: