0a36a57901
Dev convenience so you can author playbooks on the host and have Steward's local-source discovery pick them up. ./ansible-dev/ is gitignored (operator content); a safe demo playbook lives there locally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
services:
|
|
steward:
|
|
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:
|
|
- app_data:/data
|
|
# 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
|
|
# Dev playbooks: edit on the host under ./ansible-dev/, register a *local*
|
|
# Ansible source pointing at /srv/ansible in Settings → Ansible.
|
|
- ./ansible-dev:/srv/ansible
|
|
# 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
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
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:
|
|
test: ["CMD-SHELL", "pg_isready -U steward"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata:
|
|
app_data:
|