-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
86 lines (80 loc) · 1.98 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
# Compose file used for development
# Relies on base.yml, but specifies links, ports, and overrides
version: "2"
services:
learning:
extends:
file: base.yml
service: learning
environment:
- DEBUG=true
volumes:
# Mount source code so changes can be auto reloaded
- ./learning:/usr/src
# Preserve bash history
- ./learning/bash/.bashrc:/root/.bashrc
- ./learning/bash:/root/bash
command: ["gunicorn", "webservice.main:app", "-w", "4", "-b", ":8000", "--timeout", "60", "--reload"]
server:
extends:
file: base.yml
service: server
links:
- db
environment:
- DEBUG=true
- TEST_MODE=${TEST_MODE}
volumes:
# Mount source code so changes can be auto reloaded
- ./server:/usr/src/app
# Preserve bash history
- ./server/bash/.bashrc:/root/.bashrc
- ./server/bash:/root/bash
# Pass reload flag so service restarts on code changes
command: ["/usr/src/app/launch_server.sh", "--reload"]
# Container for serving React app
jsdev:
restart: always
build:
context: ./ui
dockerfile: Dockerfile.dev
networks:
main:
aliases:
- jsdev
expose:
- "3000"
volumes:
# Mount source code so changes can be auto reloaded
- ./ui/js/public:/js_app/public
- ./ui/js/src:/js_app/src
# Preserve bash history
- ./ui/bash/.bashrc:/root/.bashrc
- ./ui/bash:/root/bash
command: ["yarn", "start"]
ui:
extends:
file: base.yml
service: ui
volumes:
# Mount development nginx conf for js dev server
- ./ui/conf.d/app.dev.conf:/etc/nginx/conf-includes/app.conf
volumes_from:
- server
links:
- jsdev
db:
extends:
file: base.yml
service: db
volumes:
- ./db/starter_db:/docker-entrypoint-initdb.d
ports:
# Expose DB when running in development mode
- "5432:5432"
volumes:
media:
pgdata:
static:
networks:
main: