2022-04-20 20:30:44 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
services:
|
|
|
|
broker:
|
|
|
|
image: rabbitmq:3-alpine
|
|
|
|
restart: unless-stopped
|
2023-05-06 00:09:46 +02:00
|
|
|
networks:
|
|
|
|
- dev
|
2022-04-20 20:30:44 +02:00
|
|
|
ports:
|
|
|
|
- 127.0.0.1:5672:5672
|
|
|
|
|
2023-05-06 00:09:46 +02:00
|
|
|
result-backend:
|
2022-04-20 20:30:44 +02:00
|
|
|
image: redis:6-alpine
|
|
|
|
restart: unless-stopped
|
2023-05-06 00:09:46 +02:00
|
|
|
networks:
|
|
|
|
- dev
|
2022-04-20 20:30:44 +02:00
|
|
|
ports:
|
|
|
|
- 127.0.0.1:6379:6379
|
2023-05-06 00:09:46 +02:00
|
|
|
|
|
|
|
server:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile-dev
|
|
|
|
image: shiftregister:dev
|
|
|
|
restart: unless-stopped
|
|
|
|
command:
|
|
|
|
- python
|
|
|
|
- manage.py
|
|
|
|
- runserver
|
|
|
|
- 0.0.0.0:8000
|
|
|
|
environment: &celery
|
|
|
|
CELERY_BROKER_URL: amqp://guest:guest@broker:5672//
|
|
|
|
CELERY_RESULT_BACKEND: redis://result-backend
|
|
|
|
networks:
|
|
|
|
- dev
|
|
|
|
ports:
|
|
|
|
- 127.0.0.1:8000:8000
|
|
|
|
volumes:
|
|
|
|
- .:/opt/shiftregister
|
|
|
|
|
|
|
|
worker:
|
|
|
|
image: shiftregister:dev
|
|
|
|
restart: unless-stopped
|
|
|
|
command:
|
|
|
|
- celery
|
|
|
|
- -A
|
|
|
|
- shiftregister
|
|
|
|
- worker
|
|
|
|
- -B
|
|
|
|
- -l
|
|
|
|
- DEBUG
|
|
|
|
environment: *celery
|
|
|
|
networks:
|
|
|
|
- dev
|
|
|
|
volumes:
|
|
|
|
- .:/opt/shiftregister
|
|
|
|
|
|
|
|
networks:
|
|
|
|
dev:
|