wave 1 wiring: Dockerfile API stage + compose API command + README quickstart
- Dockerfile: pip-install requirements.txt and copy crafting_table/ into /app, switch CMD from /bin/bash to uvicorn server (port 8810). pip lands in /usr/local/bin so the crafter user runs uvicorn without elevation. - compose.yml: replace smoke.sh entrypoint with the API server command; bind 192.168.0.5:8810:8810 (LAN-only); switch named volumes to real Lucy appdata paths so /data + /workspace + /caches survive recreate. env_file marked optional so a fresh checkout boots without copying .env.example. - README.md: tick steps 1-4 done, document API surface table, add curl-based quickstart (mint token → register project → kick off job → poll → stream log), and an architecture-notes section covering the recipe-immutability snapshot, process-group SIGTERM/SIGKILL escalation, WAL+single-writer trade-off, and the recipe-security stance. Smoke remains runnable on demand: docker compose run --rm crafting-table /usr/local/bin/smoke.sh
This commit is contained in:
parent
0ec3a04676
commit
2e16ec886d
3 changed files with 199 additions and 37 deletions
39
compose.yml
39
compose.yml
|
|
@ -1,7 +1,12 @@
|
|||
# crafting-table v0.1 — step 1 compose.
|
||||
# crafting-table v0.1 — wave 1 compose (steps 2+3+4 wired in).
|
||||
#
|
||||
# Builds the monolith image and runs the smoke test once.
|
||||
# In step 2+ the `command:` is replaced with the API server entrypoint.
|
||||
# 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:
|
||||
|
|
@ -9,19 +14,27 @@ services:
|
|||
build: .
|
||||
image: crafting-table:local
|
||||
container_name: crafting-table
|
||||
command: ["/usr/local/bin/smoke.sh"]
|
||||
command:
|
||||
- uvicorn
|
||||
- crafting_table.server:app
|
||||
- --host
|
||||
- "0.0.0.0"
|
||||
- --port
|
||||
- "8810"
|
||||
user: crafter
|
||||
working_dir: /workspace
|
||||
working_dir: /home/crafter
|
||||
# env_file is optional; copy .env.example to .env to override defaults.
|
||||
env_file:
|
||||
- path: .env
|
||||
required: false
|
||||
ports:
|
||||
- "192.168.0.5:8810:8810"
|
||||
volumes:
|
||||
- workspace:/workspace
|
||||
- caches:/caches
|
||||
- data:/data
|
||||
- /mnt/user/appdata/crafting-table/data:/data
|
||||
- /mnt/user/appdata/crafting-table/workspace:/workspace
|
||||
- /mnt/user/appdata/crafting-table/caches:/caches
|
||||
networks: [sulkta]
|
||||
|
||||
volumes:
|
||||
workspace:
|
||||
caches:
|
||||
data:
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
sulkta:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue