mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 09:46:25 +02:00
fix: reduced docker size by 67%
This commit is contained in:
parent
aed8163aee
commit
590baff093
3 changed files with 75 additions and 37 deletions
|
|
@ -55,43 +55,44 @@ services:
|
|||
- db
|
||||
- redis
|
||||
|
||||
celery_worker:
|
||||
build: ./surfsense_backend
|
||||
# image: ghcr.io/modsetter/surfsense_backend:latest
|
||||
command: celery -A app.celery_app worker --loglevel=info --concurrency=1 --pool=solo
|
||||
volumes:
|
||||
- ./surfsense_backend:/app
|
||||
- shared_temp:/tmp
|
||||
env_file:
|
||||
- ./surfsense_backend/.env
|
||||
environment:
|
||||
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-surfsense}
|
||||
- CELERY_BROKER_URL=redis://redis:${REDIS_PORT:-6379}/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:${REDIS_PORT:-6379}/0
|
||||
- PYTHONPATH=/app
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- backend
|
||||
# Run these services seperately in production
|
||||
# celery_worker:
|
||||
# build: ./surfsense_backend
|
||||
# # image: ghcr.io/modsetter/surfsense_backend:latest
|
||||
# command: celery -A app.celery_app worker --loglevel=info --concurrency=1 --pool=solo
|
||||
# volumes:
|
||||
# - ./surfsense_backend:/app
|
||||
# - shared_temp:/tmp
|
||||
# env_file:
|
||||
# - ./surfsense_backend/.env
|
||||
# environment:
|
||||
# - DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-surfsense}
|
||||
# - CELERY_BROKER_URL=redis://redis:${REDIS_PORT:-6379}/0
|
||||
# - CELERY_RESULT_BACKEND=redis://redis:${REDIS_PORT:-6379}/0
|
||||
# - PYTHONPATH=/app
|
||||
# depends_on:
|
||||
# - db
|
||||
# - redis
|
||||
# - backend
|
||||
|
||||
celery_beat:
|
||||
build: ./surfsense_backend
|
||||
# image: ghcr.io/modsetter/surfsense_backend:latest
|
||||
command: celery -A app.celery_app beat --loglevel=info
|
||||
volumes:
|
||||
- ./surfsense_backend:/app
|
||||
- shared_temp:/tmp
|
||||
env_file:
|
||||
- ./surfsense_backend/.env
|
||||
environment:
|
||||
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-surfsense}
|
||||
- CELERY_BROKER_URL=redis://redis:${REDIS_PORT:-6379}/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:${REDIS_PORT:-6379}/0
|
||||
- PYTHONPATH=/app
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- celery_worker
|
||||
# celery_beat:
|
||||
# build: ./surfsense_backend
|
||||
# # image: ghcr.io/modsetter/surfsense_backend:latest
|
||||
# command: celery -A app.celery_app beat --loglevel=info
|
||||
# volumes:
|
||||
# - ./surfsense_backend:/app
|
||||
# - shared_temp:/tmp
|
||||
# env_file:
|
||||
# - ./surfsense_backend/.env
|
||||
# environment:
|
||||
# - DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-surfsense}
|
||||
# - CELERY_BROKER_URL=redis://redis:${REDIS_PORT:-6379}/0
|
||||
# - CELERY_RESULT_BACKEND=redis://redis:${REDIS_PORT:-6379}/0
|
||||
# - PYTHONPATH=/app
|
||||
# depends_on:
|
||||
# - db
|
||||
# - redis
|
||||
# - celery_worker
|
||||
|
||||
# flower:
|
||||
# build: ./surfsense_backend
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue