-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (72 loc) · 1.56 KB
/
Copy pathdocker-compose.yml
File metadata and controls
77 lines (72 loc) · 1.56 KB
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
version: '3.8'
services:
web:
build:
context: .
dockerfile: ./compose/local/flask/Dockerfile
image: flask_api_base_webapp
deploy:
resources:
limits:
memory: 2048M
# '/start' is the shell script used to run the service
command: /start
# this volume is used to map the files and folders on the host to the container
# so if we change code on the host, code in the docker container will also be changed
volumes:
- .:/app
ports:
- "9000:9000"
env_file:
- .envdir/.env
environment:
- FLASK_APP=flask_api_base.py
depends_on:
- redis
- mailhog
redis:
image: redis:6-alpine
celery_worker:
build:
context: .
dockerfile: ./compose/local/flask/Dockerfile
image: flask_api_base_celery_worker
deploy:
resources:
limits:
memory: 3000M
command: /start-celeryworker
volumes:
- .:/app
env_file:
- .envdir/.env
environment:
- FLASK_APP=flask_api_base.py
depends_on:
- redis
- mailhog
flower:
build:
context: .
dockerfile: ./compose/local/flask/Dockerfile
image: flask_api_base_celery_flower
deploy:
resources:
limits:
memory: 512M
command: /start-flower
volumes:
- .:/app
env_file:
- .envdir/.env
environment:
- FLASK_APP=flask_api_base.py
ports:
- 5557:5555
depends_on:
- redis
mailhog:
image: mailhog/mailhog:latest
ports:
- "1025:1025"
- "8025:8025"