fix(docker): stop ignoring plugins/ in image build; dev-friendly compose
.dockerignore excluded plugins/ (leftover from the separate-repo era), so the Dockerfile's COPY plugins/ found nothing and the build failed. Track it now that first-party plugins ship in the image. docker-compose.yml reworked for local dev: live-mounted ./steward + ./plugins with PYTHONPATH=/app, --debug auto-reload, fixed dev SECRET_KEY, Postgres port exposed, and the host-specific traefik/docker.sock mounts commented out. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -26,8 +26,9 @@ config.yaml
|
||||
# Runtime data (mounted at runtime via volume)
|
||||
playbook_cache/
|
||||
|
||||
# Plugins (mounted at runtime via volume)
|
||||
plugins/
|
||||
# NOTE: first-party plugins under plugins/ now ship IN the image
|
||||
# (Dockerfile `COPY plugins/`), so plugins/ must NOT be ignored here.
|
||||
# Third-party plugins are mounted at runtime into /data/plugins instead.
|
||||
|
||||
# Deployment files not needed in image
|
||||
docker-compose.yml
|
||||
|
||||
+17
-5
@@ -3,17 +3,26 @@ services:
|
||||
build: .
|
||||
container_name: steward
|
||||
image: steward:latest
|
||||
# Dev: --debug turns on Quart's auto-reloader so edits to the mounted source
|
||||
# below take effect without a rebuild.
|
||||
command: ["steward", "--host", "0.0.0.0", "--port", "5000", "--debug"]
|
||||
ports:
|
||||
- "5000:5000"
|
||||
volumes:
|
||||
# First-party plugins are baked into the image at /app/plugins.
|
||||
# Third-party plugins persist in the external root /data/plugins
|
||||
# (inside app_data); STEWARD_PLUGIN_DIR defaults there, no extra mount needed.
|
||||
- app_data:/data
|
||||
- /mnt/Data/traefik/log:/var/log/traefik:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
# Live-edit core + first-party plugins without rebuilding. PYTHONPATH=/app
|
||||
# (below) makes this mounted source win over the image-installed package.
|
||||
- ./steward:/app/steward
|
||||
- ./plugins:/app/plugins
|
||||
# Optional host mounts — enable the matching plugin in Settings first, then
|
||||
# uncomment (the traefik path must exist on this host):
|
||||
# - /mnt/Data/traefik/log:/var/log/traefik:ro # traefik plugin
|
||||
# - /var/run/docker.sock:/var/run/docker.sock:ro # docker plugin
|
||||
environment:
|
||||
- STEWARD_DATABASE_URL=postgresql+asyncpg://steward:steward@db/steward
|
||||
# Dev-only fixed key so sessions survive restarts. Replace in production.
|
||||
- STEWARD_SECRET_KEY=dev-secret-key-change-me
|
||||
- PYTHONPATH=/app
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
@@ -25,6 +34,9 @@ services:
|
||||
POSTGRES_USER: steward
|
||||
POSTGRES_PASSWORD: steward
|
||||
POSTGRES_DB: steward
|
||||
ports:
|
||||
# Exposed for dev convenience (psql from the host). Drop for prod.
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
|
||||
Reference in New Issue
Block a user