crafting-table/compose.yml
Cobb Hayes b335405c02 Public-flip audit: generalize internal hosts/paths + drop Sulkta-internal refs
URLs, mount paths, and LAN host bindings parameterized via env or relative paths
so the repo stands up from a clean clone anywhere. Drop cross-codebase refs
("mirrors clawdforge's pattern"), Sulkta-Coop client/merchant test fixtures,
and audit-changelog scaffolding from comments. README terser, technical content
preserved.
2026-05-27 11:25:47 -07:00

65 lines
2.4 KiB
YAML

# crafting-table compose.
#
# Default command is the API server. To run the per-toolchain smoke after
# a rebuild:
# docker compose run --rm crafting-table /usr/local/bin/smoke.sh
#
# Volumes are relative paths under the compose project dir by default; point
# them at host appdata via env vars if you want persistence across container
# recreation. Port binds to all interfaces by default — set CRAFTING_BIND_IP
# to scope it to a single host IP on a multi-homed box.
name: crafting-table
services:
crafting-table:
build: .
image: crafting-table:local
container_name: crafting-table
command:
- uvicorn
- crafting_table.server:app
- --host
- "0.0.0.0"
- --port
- "8810"
user: crafter
working_dir: /home/crafter
# env_file is optional. Copy .env.example to .env to override defaults.
# CRAFTING_SECRETS_ENV can point at a host-side secrets file outside the
# repo (vault-managed) — leave unset to skip.
env_file:
- path: .env
required: false
- path: ${CRAFTING_SECRETS_ENV:-./secrets/crafting-table.env}
required: false
ports:
- "${CRAFTING_BIND_IP:-0.0.0.0}:8810:8810"
volumes:
- ${CRAFTING_DATA_DIR:-./data}:/data
- ${CRAFTING_WORKSPACE_DIR:-./workspace}:/workspace
- ${CRAFTING_CACHES_DIR:-./caches}:/caches
# Nix store — bind mount to a host path with plenty of free space,
# NOT a bare docker-managed volume. Docker-managed volumes live at
# /var/lib/docker/volumes/, which is inside the docker.img loop file
# on Unraid-style hosts and shared with every other volume + image
# layer. The Plutarch + haskell-nix closure is tens of GB and will
# fill docker.img.
#
# Override CRAFTING_NIX_DIR to point at the cache pool / NVMe / etc.
# Pre-seed the host path with the image's stock /nix install ONCE at
# container init (bare bind mount to an empty host dir shadows the
# image's /nix install).
#
# First-time seed when the bind path is empty:
# mkdir -p "$CRAFTING_NIX_DIR"
# chown 1000:1000 "$CRAFTING_NIX_DIR"
# docker create --name ct-seed crafting-table:local
# docker cp ct-seed:/nix/. "$CRAFTING_NIX_DIR/"
# docker rm ct-seed
- ${CRAFTING_NIX_DIR:-./nix}:/nix
networks: [crafting-table]
restart: unless-stopped
networks:
crafting-table:
driver: bridge