-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
83 lines (77 loc) · 1.9 KB
/
docker-compose.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
services:
backend:
container_name: backend
build:
context: .
dockerfile: Dockerfile.server
env_file:
- .env
environment:
- PYTHON_ENV=development
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
volumes:
- ./server:/app/api
command: >
sh -c "python3 -m sanic api.app --host 0.0.0.0 --port 8000 --workers 1 --dev"
client:
container_name: client
build:
context: .
dockerfile: Dockerfile.client
ports:
- 3000:80
depends_on:
- backend
volumes:
- ./client/dist:/usr/share/nginx/html
- ./nginx/nginx.dev.conf:/etc/nginx/conf.d/default.conf
command: >
sh -c "nginx -g 'daemon off;'"
redis:
container_name: redis
image: public.ecr.aws/docker/library/redis:latest
ports:
- 6379:6379
depends_on:
- backend
- client
celery_worker:
container_name: celery_worker
build:
context: .
dockerfile: Dockerfile.server
env_file:
- .env
environment:
- PYTHON_ENV=development
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- C_FORCE_ROOT=false
volumes:
- ./server:/app/api
command: bash -c "celery -A workers.celery_config.celery worker --loglevel=info"
depends_on:
- backend
- redis
celery_flower:
container_name: celery_flower
build:
context: .
dockerfile: Dockerfile.server
env_file:
- .env
environment:
- PYTHON_ENV=development
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- C_FORCE_ROOT=false
volumes:
- ./server:/app/api
command: bash -c "celery -A workers.celery_config.celery flower --port=5555"
expose:
- 5555
ports:
- 5556:5555
depends_on:
- celery_worker