-
Notifications
You must be signed in to change notification settings - Fork 20
/
docker-compose.yml
99 lines (99 loc) · 2.35 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
services:
mongo:
image: mongo:4.4
ports:
- "27017:27017"
redis:
image: redis:7
ports:
- "6379:6379"
command: sh -c "rm -f /data/dump.rdb && redis-server" # Disable persistence
nginx:
image: nginx:1.25
volumes:
- ./nginx-dev.conf:/etc/nginx/conf.d/default.conf
- image-volume:/mnt/images
ports:
- 80:80
depends_on:
- server
- client
server:
build:
context: .
dockerfile: app/Dockerfile
target: dev-server
environment:
- MONGODB_URI=mongodb://mongo:27017/
- DATABASE=dev
- FLASK_DEBUG=1
- FLASK_APP=./app.py
# - FLASK_SECRET_KEY=XYZ
- FLASK_SERVER_NAME=localhost
- CLIENT_HOST=http://localhost
# - GOOGLE_CLIENT_ID=ABC
# - GOOGLE_CLIENT_SECRET=XYZ
- OAUTHLIB_INSECURE_TRANSPORT=1
- REDIS_HOST=redis:6379
- IMAGE_STORE_PATH=/mnt/images/
- PUBLIC_IMAGE_FOLDER=http://localhost/images/
ports:
- "5001:5000" # flask
- "5678:5678" # debugpy
depends_on:
- mongo
- redis
volumes:
- ./:/usr/src/app
- image-volume:/mnt/images
worker:
build:
context: .
dockerfile: app/Dockerfile
target: dev-worker
environment:
- MONGODB_URI=mongodb://mongo:27017/
- DATABASE=dev
- FLASK_DEBUG=1
- FLASK_APP=./app.py
# - FLASK_SECRET_KEY=XYZ
- FLASK_SERVER_NAME=localhost
- CLIENT_HOST=http://localhost
# - GOOGLE_CLIENT_ID=ABC
# - GOOGLE_CLIENT_SECRET=XYZ
- OAUTHLIB_INSECURE_TRANSPORT=1
- REDIS_HOST=redis:6379
- IMAGE_STORE_PATH=/mnt/images/
- PUBLIC_IMAGE_FOLDER=http://localhost/images/
- CELERY_CONCURRENCY=32
ports:
- "5679:5678" # debugpy
depends_on:
- mongo
- redis
volumes:
- ./:/usr/src/app
- image-volume:/mnt/images
flower:
image: mher/flower
environment:
- FLOWER_UNAUTHENTICATED_API=1
command: "celery --broker=redis://redis:6379 flower --port=5555"
ports:
- "5555:5555"
depends_on:
- redis
client:
build:
dockerfile: Dockerfile
context: ./client
environment:
- VITE_SERVER_HOST=http://localhost
volumes:
- client-node-modules:/app/node_modules
- ./client:/app
ports:
- "3000:3000"
volumes:
image-volume:
client-node-modules: