-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (50 loc) · 1.46 KB
/
docker-compose.yml
File metadata and controls
51 lines (50 loc) · 1.46 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
44
45
46
47
48
49
50
51
version: '2'
services:
db:
restart: always
image: postgres:9.6
environment:
POSTGRES_PASSWORD: fuchtard
POSTGRES_USER: fuchtard
POSTGRES_DB: fuchtard
ports:
- "127.0.0.1:5432:5432"
volumes:
- /usr/src/postgres-data:/var/lib/postgresql/data
nginx:
restart: always
image: nginx
ports:
- "80:80"
volumes:
- ./nginx.conf.template:/etc/nginx/conf.d/default.conf.template
- ./uwsgi_params:/etc/nginx/uwsgi_params
- ./client/web/public/.:/usr/src/app/client/web/public
- ./client/dist/browser/.:/usr/src/app/client/dist/browser
- ./static_content/media/.:/usr/src/app/static_content/media
- ./static_content/static/.:/usr/src/app/static_content/static
command: >
/bin/bash -c "envsubst '$$FOO'
< /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
&& nginx -g 'daemon off;'"
backend:
restart: always
build: ./backend
env_file: .env
ports:
- "127.0.0.1:8000:8000"
volumes:
- ./static_content/media/.:/usr/src/app/static_content/media
entrypoint: uwsgi --socket :8000 --module fuchtard.wsgi
collectstatic:
build: ./backend
env_file: .env
volumes:
- ./static_content/static/.:/usr/src/app/static_content/static
command: collectstatic --noinput
frontend:
image: node:7.9
working_dir: /usr/src/app/client
volumes:
- ./client/.:/usr/src/app/client
command: npm run build