Simplify compose files and .env.example
Folders, port and image are written straight into compose.yaml; the KANAME_DATA_DIR, KANAME_MODELS_DIR, WEB_PORT and KANAME_IMAGE variables are gone. .env.example is down to the settings people actually set. README and CHANGELOG updated accordingly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5bc1ad1395
commit
15d8ae155e
5 files changed
+92
-109
No files matched your search
+26
-25
@@ -1,50 +1,51 @@
|
||||
# Builds the image from this checkout. For the server use deploy/compose.yaml (released image).
|
||||
name: kaname
|
||||
|
||||
x-app: &app
|
||||
image: kaname:local
|
||||
build: .
|
||||
env_file: .env
|
||||
# Container paths win over local-dev paths in .env.
|
||||
environment:
|
||||
DATABASE_URL: file:/data/app.db
|
||||
MODELS_DIR: /models
|
||||
HF_HOME: /data/hf-home
|
||||
restart: unless-stopped
|
||||
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
image: kaname:local
|
||||
env_file: .env
|
||||
environment:
|
||||
DATABASE_URL: file:/data/app.db # container paths win over local-dev paths in .env
|
||||
MODELS_DIR: /models
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- data:/data
|
||||
restart: unless-stopped
|
||||
|
||||
worker:
|
||||
<<: *app
|
||||
image: kaname:local
|
||||
command: worker
|
||||
env_file: .env
|
||||
environment:
|
||||
DATABASE_URL: file:/data/app.db
|
||||
MODELS_DIR: /models
|
||||
HF_HOME: /data/hf-home
|
||||
SANDBOX_DIR: /sandbox
|
||||
volumes: [data:/data, models:/models, sandbox:/sandbox]
|
||||
volumes:
|
||||
- data:/data
|
||||
- models:/models
|
||||
- sandbox:/sandbox
|
||||
depends_on: [web]
|
||||
restart: unless-stopped
|
||||
|
||||
web:
|
||||
<<: *app
|
||||
ports: ["${WEB_PORT:-3000}:3000"]
|
||||
volumes: [data:/data]
|
||||
|
||||
# Runs the quality eval's coding answers (Python written by the model under test) with no
|
||||
# network, a read-only root, no capabilities, small limits and an unprivileged user. It shares only
|
||||
# the exchange folder with the worker. Optional: without it the quality eval skips coding.
|
||||
sandbox:
|
||||
image: kaname:local
|
||||
command: sandbox
|
||||
user: "65534:65534"
|
||||
depends_on: [worker]
|
||||
network_mode: none
|
||||
read_only: true
|
||||
tmpfs: ["/tmp:size=64m,mode=1777"]
|
||||
tmpfs:
|
||||
- /tmp:size=64m,mode=1777
|
||||
cap_drop: [ALL]
|
||||
security_opt: ["no-new-privileges:true"]
|
||||
mem_limit: 512m
|
||||
pids_limit: 64
|
||||
cpus: 1
|
||||
volumes: [sandbox:/sandbox]
|
||||
volumes:
|
||||
- sandbox:/sandbox
|
||||
depends_on: [worker]
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
|
||||
Reference in new issue
Block a user