Skip to content

Open-source personal finance manager. Self-hosted, privacy-first.

Add production docker-compose using ghcr.io images

Tássio Noronha52b8baa63162
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
new file mode 100644
index 00000000..c39c40a1
--- /dev/null
+++ b/docker-compose.prod.yml
@@ -0,0 +1,69 @@
+name: securo
+
+x-backend-env: &backend-env
+ DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/securo
+ SECRET_KEY: ${SECRET_KEY:-dev-secret-change-in-production}
+ DEBUG: ${DEBUG:-false}
+ FRONTEND_URL: ${FRONTEND_URL:-http://localhost:3000}
+ PLUGGY_CLIENT_ID: ${PLUGGY_CLIENT_ID:-}
+ PLUGGY_CLIENT_SECRET: ${PLUGGY_CLIENT_SECRET:-}
+ PLUGGY_OAUTH_REDIRECT_URI: ${PLUGGY_OAUTH_REDIRECT_URI:-http://localhost:3000/oauth/callback}
+ REDIS_URL: redis://redis:6379/0
+
+x-backend-base: &backend-base
+ image: ghcr.io/securo-finance/securo-backend:latest
+ environment: *backend-env
+ depends_on:
+ db: { condition: service_healthy }
+ redis: { condition: service_healthy }
+ restart: unless-stopped
+
+services:
+ redis:
+ image: redis:7-alpine
+ healthcheck:
+ test: ["CMD", "redis-cli", "ping"]
+ interval: 5s
+ timeout: 3s
+ retries: 5
+
+ db:
+ image: postgres:16-alpine
+ environment:
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: postgres
+ POSTGRES_DB: securo
+ volumes:
+ - pgdata:/var/lib/postgresql/data
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U postgres"]
+ interval: 5s
+ timeout: 3s
+ retries: 5
+
+ backend:
+ <<: *backend-base
+ command: sh -c "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000"
+ ports:
+ - "8000:8000"
+
+ frontend:
+ image: ghcr.io/securo-finance/securo-frontend:latest
+ ports:
+ - "3000:3000"
+ environment:
+ BACKEND_URL: http://backend:8000
+ depends_on:
+ - backend
+ restart: unless-stopped
+
+ celery-worker:
+ <<: *backend-base
+ command: celery -A app.worker worker --loglevel=info
+
+ celery-beat:
+ <<: *backend-base
+ command: celery -A app.worker beat --loglevel=info
+
+volumes:
+ pgdata: