Files
templates/blueprints/automatisch/docker-compose.yml
Mauricio Siu 3c416eaba3 fix(automatisch): switch to official image and wire up DOMAIN to fix Bad Gateway
- Replace unofficial dockeriddonuts/automatisch:2.0 mirror (stale since Nov 2024)
  with the official automatischio/automatisch:0.15.0 image
- Define DOMAIN in template.toml [config.env]: the compose referenced ${DOMAIN}
  but it was never provided, so HOST resolved empty and the app generated
  localhost URLs for the web app and webhooks
- Set API_URL/WEB_APP_URL so generated URLs don't carry the internal :3000 port
  behind Traefik
- Add postgres healthcheck and gate the app on service_healthy to avoid the
  boot-time migration race; worker now starts after main (official compose order)
- Drop unnecessary published port and no-op REDIS_* env on the redis service
- Bump meta.json version to 0.15.0

Closes #97

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 11:28:22 -06:00

75 lines
2.0 KiB
YAML

services:
automatisch:
image: automatischio/automatisch:0.15.0
restart: unless-stopped
environment:
- HOST=${DOMAIN}
- PROTOCOL=http
- PORT=3000
- API_URL=http://${DOMAIN}
- WEB_APP_URL=http://${DOMAIN}
- APP_ENV=production
- REDIS_HOST=automatisch-redis
- REDIS_PASSWORD=${REDIS_PASSWORD}
- POSTGRES_HOST=automatisch-postgres
- POSTGRES_DATABASE=automatisch
- POSTGRES_USERNAME=postgres
- POSTGRES_PASSWORD=${DB_PASSWORD}
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
- WEBHOOK_SECRET_KEY=${WEBHOOK_SECRET_KEY}
- APP_SECRET_KEY=${APP_SECRET_KEY}
volumes:
- storage:/automatisch/storage
depends_on:
automatisch-postgres:
condition: service_healthy
automatisch-redis:
condition: service_started
automatisch-worker:
image: automatischio/automatisch:0.15.0
restart: unless-stopped
environment:
- APP_ENV=production
- REDIS_HOST=automatisch-redis
- REDIS_PASSWORD=${REDIS_PASSWORD}
- POSTGRES_HOST=automatisch-postgres
- POSTGRES_DATABASE=automatisch
- POSTGRES_USERNAME=postgres
- POSTGRES_PASSWORD=${DB_PASSWORD}
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
- WEBHOOK_SECRET_KEY=${WEBHOOK_SECRET_KEY}
- APP_SECRET_KEY=${APP_SECRET_KEY}
- WORKER=true
volumes:
- storage:/automatisch/storage
depends_on:
- automatisch
automatisch-postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=automatisch
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d automatisch"]
interval: 10s
timeout: 5s
retries: 5
automatisch-redis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- redis_data:/data
volumes:
storage: {}
postgres_data: {}
redis_data: {}