60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
# Remote deployment — pulls the published :dev image instead of building locally.
|
|
#
|
|
# This is NOT the local-dev compose. `docker-compose.yml` bind-mounts ./steward
|
|
# + ./plugins and runs --debug for live editing; THIS file runs the image as the
|
|
# source of truth (no bind-mounts, no reloader) for a persistent remote instance
|
|
# that tracks the dev CI line.
|
|
#
|
|
# Standup + update runbook: see README → "Remote dev instance".
|
|
|
|
services:
|
|
steward:
|
|
image: git.fabledsword.com/bvandeusen/steward:dev
|
|
container_name: steward
|
|
# Re-pull :dev on every `up` so restarting the stack picks up the latest
|
|
# green dev build without a manual `docker pull`.
|
|
pull_policy: always
|
|
ports:
|
|
- "5000:5000"
|
|
networks:
|
|
- backend
|
|
volumes:
|
|
# /data holds the auto-generated secret key, third-party plugins, and the
|
|
# Ansible playbook cache — all of which must survive image updates. No
|
|
# source bind-mounts: core + first-party plugins live inside the image.
|
|
- app_data:/data
|
|
environment:
|
|
- STEWARD_DATABASE_URL=postgresql+asyncpg://steward:${POSTGRES_PASSWORD:-steward}@db/steward
|
|
# STEWARD_SECRET_KEY is intentionally absent — the app generates a random
|
|
# key on first boot and persists it to /data/secret.key, which the app_data
|
|
# volume keeps across image updates.
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
networks:
|
|
- backend
|
|
environment:
|
|
POSTGRES_USER: steward
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-steward}
|
|
POSTGRES_DB: steward
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
# No host port published — db is reachable only on the backend network.
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U steward"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
backend:
|
|
|
|
volumes:
|
|
pgdata:
|
|
app_data:
|