2026-02-09 08:05:54 +01:00
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
db:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: mastodon_collector
|
|
|
|
|
POSTGRES_USER: collector
|
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-collector_secret}
|
|
|
|
|
volumes:
|
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
|
ports:
|
|
|
|
|
- "127.0.0.1:5434:5432"
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U collector -d mastodon_collector"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
web:
|
|
|
|
|
build: .
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
command: gunicorn --bind 0.0.0.0:5000 --workers 2 --timeout 120 app.web:app
|
|
|
|
|
ports:
|
|
|
|
|
- "127.0.0.1:8585:5000"
|
|
|
|
|
environment:
|
|
|
|
|
DATABASE_URL: postgresql://collector:${POSTGRES_PASSWORD:-collector_secret}@db:5432/mastodon_collector
|
|
|
|
|
FLASK_SECRET_KEY: ${FLASK_SECRET_KEY:-change-me-in-production}
|
|
|
|
|
volumes:
|
|
|
|
|
- ./accounts.txt:/app/accounts.txt
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
|
|
collector:
|
|
|
|
|
build: .
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
command: python -m app.collector
|
|
|
|
|
environment:
|
|
|
|
|
DATABASE_URL: postgresql://collector:${POSTGRES_PASSWORD:-collector_secret}@db:5432/mastodon_collector
|
|
|
|
|
POLL_INTERVAL_SECONDS: ${POLL_INTERVAL_SECONDS:-14400}
|
2026-03-30 15:39:36 +02:00
|
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
2026-02-09 08:05:54 +01:00
|
|
|
volumes:
|
|
|
|
|
- ./accounts.txt:/app/accounts.txt
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
pgdata:
|