crafting-table/compose.yml
Kayos 169b38b4ba fix: switch /nix to docker-managed volume (was bind mount)
Bind-mount to an empty host dir was shadowing the image's
pre-installed /nix tree at runtime — `nix --version` returned
"sh: nix: not found" inside the live container even though the
binary was baked into the image at build time.

Docker auto-populates a fresh named volume from the image's
content on first mount. So the named-volume version preserves
the install AND persists across container recreations.

Volume name `crafting-table-nix`. Lives at the docker default
volume path on Lucy. Backups/migration-out: `docker run --rm
-v crafting-table-nix:/src -v /tmp:/dst alpine tar cf /dst/nix.tar /src`.
2026-05-06 17:08:37 -07:00

53 lines
1.6 KiB
YAML

# crafting-table v0.1 — wave 1 compose (steps 2+3+4 wired in).
#
# Default `command` is the API server. To run the per-language smoke after
# a rebuild, do:
# docker compose run --rm crafting-table /usr/local/bin/smoke.sh
#
# Volumes mount real Lucy appdata paths so /data + /workspace + /caches
# survive container recreation. Port is bound to LAN only — no Rackham
# proxy.
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.
env_file:
- path: .env
required: false
- path: /mnt/cache/appdata/secrets/crafting-table.env
required: false
ports:
- "192.168.0.5:8810:8810"
volumes:
- /mnt/user/appdata/crafting-table/data:/data
- /mnt/user/appdata/crafting-table/workspace:/workspace
- /mnt/user/appdata/crafting-table/caches:/caches
# Nix store — Docker-managed volume (NOT bind mount) so the image's
# pre-installed /nix tree gets seeded into the volume on first up.
# A bare bind mount to an empty host dir would shadow the image's
# /nix and leave `nix` unfindable inside the container.
# Persists haskell-nix downloads (multi-GB Plutarch / IOG flake
# closures) across container rebuilds.
- crafting-table-nix:/nix
networks: [sulkta]
restart: unless-stopped
volumes:
crafting-table-nix:
networks:
sulkta:
external: true