-
Notifications
You must be signed in to change notification settings - Fork 37
/
docker-compose-backend-workers.yml
67 lines (61 loc) · 1.2 KB
/
docker-compose-backend-workers.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
version: "3.7"
services:
postgres:
extends:
file: docker-compose-backend.yml
service: postgres
redis:
extends:
file: docker-compose-backend.yml
service: redis
worker:
build:
context: ./api
target: api-flask
working_dir: /usr/src/app
container_name: pc-worker
command: >
bash -c "set -x;
pip install -e .
pip install -r ./requirements.txt;
flask worker;"
volumes:
- ./api:/usr/src/app
env_file:
- env_file
- ${ENV:-development}_env_file
networks:
- db_nw
- web_nw
depends_on:
- postgres
- redis
worker_low:
build:
context: ./api
target: api-flask
working_dir: /usr/src/app
container_name: pc-worker-low
command: >
bash -c "set -x;
pip install -e .
pip install -r ./requirements.txt;
flask worker low;"
volumes:
- ./api:/usr/src/app
env_file:
- env_file
networks:
- db_nw
- web_nw
depends_on:
- postgres
- redis
networks:
db_nw:
driver: bridge
web_nw:
driver: bridge
volumes:
postgres_data:
redis_data: