-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (42 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
43 lines (42 loc) · 1.04 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
version: '3'
services:
redis:
image: redis
restart: always
ports:
- "6379:6379"
volumes:
- "redisdata:/data"
db:
image: mysql
expose:
- "3306"
volumes:
- ./db:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=abc123
- MYSQL_DATABASE=order_book
backend:
build: ./order_book
command: bash -c "python manage.py makemigrations & python manage.py migrate & python manage.py match_order & python manage.py archive_trade & python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
ports:
- "8000:8000"
links:
- db
- redis
env_file: env
web:
build: ./web
command: bash -c "cd web && python -m http.server 8080"
volumes:
- .:/code
ports:
- "8080:8080"
links:
- backend
env_file: env
volumes:
redisdata: