build: replace celery with procrastinate

This commit is contained in:
Herculino Trotta
2024-10-11 14:11:40 -03:00
parent c9ae8c9db5
commit 49db2089e8
18 changed files with 32 additions and 190 deletions

View File

@@ -37,59 +37,15 @@ services:
- POSTGRES_PASSWORD=${SQL_PASSWORD}
- POSTGRES_DB=${SQL_DATABASE}
redis:
image: docker.io/redis:6
container_name: ${REDIS_NAME}
restart: unless-stopped
command: redis-server --save 60 1 --loglevel warning
volumes:
- ./redis_data:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 60s
timeout: 5s
retries: 3
celeryworker:
procrastinate:
<<: *django
image: ${CELERYWORKER_NAME}
container_name: ${CELERYWORKER_NAME}
image: ${PROCRASTINATE_NAME}
container_name: ${PROCRASTINATE_NAME}
depends_on:
- redis
- db
ports: [ ]
command: /start-celeryworker
command: /start-procrastinate
restart: unless-stopped
healthcheck:
test: [ "NONE" ]
celerybeat:
<<: *django
image: ${CELERYBEAT_NAME}
container_name: ${CELERYBEAT_NAME}
depends_on:
- redis
- db
ports: [ ]
command: /start-celerybeat
restart: unless-stopped
healthcheck:
test: [ "NONE" ]
flower:
<<: *django
image: ${FLOWER_NAME}
container_name: ${FLOWER_NAME}
ports:
- '5556:5555'
command: /start-flower
restart: unless-stopped
healthcheck:
test: curl --fail http://localhost:5555/healthcheck || exit 1
interval: 60s
timeout: 30s
retries: 3
start_period: 360s
networks:
default: