diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..83f396b --- /dev/null +++ b/Justfile @@ -0,0 +1,42 @@ +dev := "docker compose -f docker-compose.yml -f docker-compose.dev.yml" +ci := "docker compose" + +# List available recipes +default: + @just --list + +# Build the base image (run once, or after Dockerfile / ComfyUI version bumps) +build: + {{dev}} build + +# Start ComfyUI with local repo mounted; stays running, streams logs +up: + {{dev}} up + +# Start in the background (detached) +up-d: + {{dev}} up -d + +# Stop and remove containers (keeps the image) +down: + {{dev}} down + +# Tail ComfyUI logs (works whether up or up-d was used) +logs: + {{dev}} logs -f comfyui + +# Open ComfyUI in the browser +open: + open http://localhost:8188 + +# Show container health / status +status: + {{dev}} ps + +# Rebuild base image from scratch, clearing Docker cache +rebuild: + {{dev}} build --no-cache + +# CI smoke test — builds from COPY, starts with --quick-test-for-ci, exits +ci-smoke: + {{ci}} up --build --exit-code-from comfyui diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..99da474 --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,12 @@ +services: + comfyui: + # Mount local repo live — no rebuild needed after code changes. + # Re-installs comfydv deps on each start (fast: jinja2 is likely cached). + volumes: + - .:/app/ComfyUI/custom_nodes/comfydv + command: + - sh + - -c + - | + pip install -q -r /app/ComfyUI/custom_nodes/comfydv/requirements.txt + exec python main.py --cpu --listen 0.0.0.0 --port 8188