-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
116 lines (107 loc) · 2.45 KB
/
docker-compose.yaml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
version: '3'
services:
frontend:
build:
context: .
dockerfile: ./docker/frontend/Dockerfile
ports:
- 8888:8888 # access the app at localhost:8888
- 5555:5555 # access webpack bundle analyzer at localhost:5555
links:
- backend
environment:
- API_HOST=backend
- API_PORT=5000
entrypoint:
- /frontend-entrypoint.sh
volumes:
- ./articles:/flask/articles
- ./frontend:/flask/frontend
mailhog:
image: mailhog/mailhog:v1.0.0
ports:
- 8025:8025 # access mailhog's webmail interface at localhost:8025
expose:
- 1025
postgres:
image: postgres:9.6.5
ports:
- 5442:5432 # access the dev db at localhost:5442
volumes:
- ./docker/postgres/data:/var/lib/postgresql
- ./docker/postgres/init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh
# sphinx_docs:
# build:
# context: .
# dockerfile: ./docker/backend/Dockerfile
# environment:
# - SPHINX_DOCS_HOST=0.0.0.0
# - SPHINX_DOCS_PORT=5500
# ports:
# - 5500:5500 # access the app documentation at localhost:5500
# entrypoint:
# - /docs-entrypoint.sh
# volumes:
# - .:/flask/src
backend:
build:
context: .
dockerfile: ./docker/backend/Dockerfile
links:
- postgres
- redis
environment:
- FLASK_DATABASE_HOST=postgres
- FLASK_REDIS_HOST=redis
entrypoint:
- /flask-entrypoint.sh
ports:
- 5000:5000
volumes:
- .:/flask/src
redis:
image: redis:3.2-alpine
command: redis-server
volumes:
- ./docker/redis/data:/data
expose:
- 6379
celery_worker:
build:
context: .
dockerfile: ./docker/backend/Dockerfile
links:
- mailhog
environment:
- FLASK_REDIS_HOST=redis
- FLASK_MAIL_HOST=mailhog
- FLASK_MAIL_PORT=1025
entrypoint:
- /celery-worker-entrypoint.sh
volumes:
- .:/flask/src
celery_beat:
build:
context: .
dockerfile: ./docker/backend/Dockerfile
environment:
- FLASK_REDIS_HOST=redis
entrypoint:
- /celery-beat-entrypoint.sh
volumes:
- .:/flask/src
pytest:
build:
context: .
dockerfile: ./docker/backend/Dockerfile
entrypoint:
- /test-entrypoint.sh
volumes:
- .:/flask/src
links:
- postgres
- redis
environment:
- FLASK_DATABASE_HOST=postgres
- FLASK_REDIS_HOST=redis