-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (58 loc) · 1.62 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
version: '3'
services:
db:
build: "./db"
volumes:
# SQL files here get executed when the container first starts
- "./db/data:/docker-entrypoint-initdb.d/"
# Anonymous volume for the database data goes here, so it persists between up/down restarts
- "/var/lib/postgresql/data"
api:
build: "./api"
volumes:
- ./api:/code
- ./api/static:/static
restart: always
depends_on:
- db
ports:
- "8000:8000"
command: "python manage.py runserver_plus 0.0.0.0:8000"
jupyter:
container_name: jupyter
build: "./api"
ports:
- "8888:8888" # Expose directly. Websockets do not play nicely with nginx proxy_pass
volumes:
- .:/code
command: "python3 api/manage.py shell_plus --notebook"
depends_on:
- db
ts:
build: "./ts"
env_file:
- './ts/.env'
ports:
# Warm reloading of the project is done by using a websocket to notify the frontend
# of file changes
- 35729:35729
volumes:
- ./ts/src:/code/src
- ./ts/build:/code/build
- ./ts/public:/code/public
# Persist the library directory in an anonymous volume
# This makes rebuilds faster, at the risk of some confusion
# You should be able to resolve issues by blowing away the whole container and starting from scratch
- /code/node_modules
web:
build: "./web"
ports:
- "80:80"
volumes:
- ./ts/dist:/usr/share/nginx/ts # Shared volume for compiled code
- ./web/static:/usr/share/nginx/static
- ./web/conf:/etc/nginx
depends_on:
- api
- db
- ts