2026-03-26 18:10:49 -04:00
|
|
|
services:
|
|
|
|
|
gsd:
|
|
|
|
|
build:
|
|
|
|
|
context: . # Build context is the docker/ directory
|
|
|
|
|
dockerfile: Dockerfile.sandbox # Runtime sandbox image with entrypoint
|
|
|
|
|
args:
|
2026-04-15 14:54:20 +02:00
|
|
|
SF_VERSION: latest # Pin a specific version: SF_VERSION=2.51.0
|
2026-03-26 18:10:49 -04:00
|
|
|
|
|
|
|
|
container_name: gsd-sandbox
|
|
|
|
|
|
|
|
|
|
ports:
|
2026-04-15 14:54:20 +02:00
|
|
|
- "3000:3000" # SF web UI
|
2026-03-26 18:10:49 -04:00
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
- ../:/workspace # Project root mounted into the container
|
2026-04-15 14:54:20 +02:00
|
|
|
- gsd-state:/home/gsd/.gsd # Persistent SF state across restarts
|
2026-03-26 18:10:49 -04:00
|
|
|
# - ~/.ssh:/home/gsd/.ssh:ro # SSH keys for git operations (read-only)
|
|
|
|
|
# - ~/.gitconfig:/home/gsd/.gitconfig:ro # Host git config
|
|
|
|
|
|
|
|
|
|
env_file:
|
|
|
|
|
- .env # API keys and secrets (see .env.example)
|
|
|
|
|
|
|
|
|
|
environment:
|
|
|
|
|
- NODE_ENV=development
|
|
|
|
|
# UID/GID remapping — match your host user to avoid permission issues
|
|
|
|
|
# on bind-mounted volumes. The entrypoint remaps the container's gsd
|
|
|
|
|
# user to these IDs at startup. Run `id -u` / `id -g` to find yours.
|
|
|
|
|
- PUID=1000
|
|
|
|
|
- PGID=1000
|
|
|
|
|
# Git identity inside the container (overrides .env if set here)
|
|
|
|
|
# - GIT_AUTHOR_NAME=Your Name
|
|
|
|
|
# - GIT_AUTHOR_EMAIL=you@example.com
|
|
|
|
|
|
|
|
|
|
stdin_open: true # Keep stdin open for interactive use
|
|
|
|
|
tty: true # Allocate a pseudo-TTY
|
|
|
|
|
|
2026-04-15 14:54:20 +02:00
|
|
|
# Health check — verify SF is installed and responsive
|
2026-03-26 18:10:49 -04:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "gsd", "--version"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 10s
|
|
|
|
|
|
|
|
|
|
# Resource limits — uncomment to constrain container resources
|
|
|
|
|
# deploy:
|
|
|
|
|
# resources:
|
|
|
|
|
# limits:
|
|
|
|
|
# cpus: "4.0"
|
|
|
|
|
# memory: 8G
|
|
|
|
|
# reservations:
|
|
|
|
|
# cpus: "1.0"
|
|
|
|
|
# memory: 2G
|
|
|
|
|
|
|
|
|
|
# Network mode — uncomment ONE if you need host networking
|
|
|
|
|
# network_mode: host # Full host network access (no port mapping needed)
|
|
|
|
|
# network_mode: bridge # Default Docker bridge (already the default)
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
gsd-state:
|
|
|
|
|
driver: local
|