-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.prod.yml
62 lines (58 loc) · 1.13 KB
/
docker-compose.prod.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:
server:
container_name: server
build:
context: ./server
stdin_open: true
tty: true
working_dir: /src
ports:
- "8000:8000"
volumes:
- ./server:/src
- run_vol:/var/run
- cache_vol:/var/cache
- tmp_vol:/tmp
env_file:
- .env.dev
environment:
- DJANGO_DEBUG=False
- GUNICORN_WORKERS=5
command: >
sh -c "sh migrations.sh && gunicorn -w 5 --reload -b 0.0.0.0:8000 --log-level info server.wsgi"
depends_on:
- db
client:
container_name: client
build: ./client
stdin_open: true
tty: true
working_dir: /src
ports:
- "3000:3000"
volumes:
- ./client:/src
command: >
sh -c "npm install -g npm@latest && npm install && npm run build && npm run start"
depends_on:
- server
- db
db:
container_name: db
image: postgres
env_file:
- .env.dev
volumes:
run_vol:
driver_opts:
type: tmpfs
device: tmpfs
cache_vol:
driver_opts:
type: tmpfs
device: tmpfs
tmp_vol:
driver_opts:
type: tmpfs
device: tmpfs