crafting-table/compose.yml
Kayos b0490a8c02 add Nix toolchain + bump Go to 1.25.9
Two coupled changes:

1. Add a single-user Nix install at section 19.5 so the container can
   `nix develop` / `nix run` / `nix build` for the Cardano smart-
   contract toolchain stack (Plutarch, plutus-core, Liqwid Agora's
   `agora-scripts` exporter — all ship as IOG haskell-nix flakes
   with pinned GHC). Without Nix, building any of those is a manual-
   version-pinning fight.

   Single-user mode (no daemon), sandbox=false (containers can't nest
   sandboxes cleanly), flakes + nix-command experimental features
   enabled. /nix is owned by `crafter` and bind-mounted from
   /mnt/user/appdata/crafting-table/nix in compose so the multi-GB
   haskell-nix downloads survive container rebuilds.

2. Bump GO_VERSION 1.22.10 → 1.25.9. govulncheck@latest (v1.3.0) and
   staticcheck@latest (v0.7.0) both now require Go ≥ 1.25 — building
   with 1.22 hits "requires go >= 1.25.0" and the per-step retry loop
   exhausts. Go's auto-toolchain-switch tries to download 1.25.9 on
   the fly but staticcheck's parent build then runs in 1.22 and
   re-fails. Pinning to 1.25.9 (current Go release) sidesteps the
   wedge.

PATH bump: prepend /home/crafter/.nix-profile/bin so nix-installed
binaries (cabal, ghc inside dev shells, cardano-cli, etc) take
precedence over system tooling without per-recipe prefixing.

Build invocation unchanged — nothing required at the docker run /
docker compose layer beyond the new /nix bind mount in compose.yml.
2026-05-06 15:08:01 -07:00

46 lines
1.4 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 — persists haskell-nix downloads (multi-GB Plutarch /
# IOG flake closures) across container rebuilds.
- /mnt/user/appdata/crafting-table/nix:/nix
networks: [sulkta]
restart: unless-stopped
networks:
sulkta:
external: true