-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.dev.yml
45 lines (40 loc) · 1.45 KB
/
docker-compose.dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
version: "3.8"
name: whisperbox-transcribe-dev
services:
traefik:
ports:
- "80:80"
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=whisperbox-transcribe-dev_traefik"
- "--entrypoints.web.address=:80"
web:
command: bash -c "alembic upgrade head && uvicorn app.web:app --reload --host ${HOST:-0.0.0.0} --port ${PORT:-8000} --log-level info --factory"
# NOTE: the docker on mac mount adapter (virtioFS) does not support flock.
# this can cause the sqlite database to corrupt when written from worker <> api simultaneously.
volumes:
- ./:/etc/whisperbox-transcribe/
labels:
- "traefik.http.routers.web.entrypoints=web"
- "traefik.enable=true"
- "traefik.http.services.web.loadbalancer.server.port=8000"
- "traefik.http.routers.web.rule=(Host(`${TRAEFIK_DOMAIN}`))"
worker:
command: watchmedo auto-restart -d app/worker -p *.py --recursive celery -- --app=app.worker.main.celery worker --loglevel=info --concurrency=1 --pool prefork
volumes:
- ./:/etc/whisperbox-transcribe/
rabbitmq:
image: rabbitmq:3-management-alpine
ports:
- 15672:15672
flower:
image: mher/flower
command: celery --broker amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq:5672 flower --port=5555
ports:
- 5555:5555
depends_on:
- worker
- rabbitmq
networks:
- app