-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
49 lines (46 loc) · 1.09 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
# This file defines two services, the db service and web service
version: '2'
services:
postgres:
restart: always # restart db service if it crashes
image: postgres
env_file: env
expose:
- "5432"
volumes:
- /var/lib/postgresql/data:/var/lib/postgresql/data
wiki:
build : ./wiki/
restart: always
image: wiki
volumes:
- /srv/html
expose:
- "3000"
web:
build : ./webpage/
hostname: production
restart: always # restart web server if it crashes
image: web
command: bash -c "python manage.py makemigrations --noinput && python manage.py migrate --noinput && gunicorn lascilab.wsgi -b 0.0.0.0:8000"
volumes:
- ./webpage:/webpage
expose:
- "8000"
links:
- postgres:postgres
env_file: env
nginx:
build : ./nginx/
restart: always
image: nginx
ports:
- "80:80"
volumes:
- /www/static
- ./nginx/sites-enabled:/etc/nginx/sites-enabled
volumes_from:
- web
- wiki
links:
- web:web