-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
52 lines (51 loc) · 1.06 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
version: '3.7'
services:
# Builds database container
database:
restart: always
container_name: hc_db
image: postgres:latest
env_file: .env
volumes:
- ./logs/db:/var/log/postgresql
- dbdata:/var/lib/postgresql/data
# Builds python code container
website:
restart: always
container_name: hc_web #name to exec into
build: .
volumes:
- ./chemie:/chemie
- ./logs/gunicorn:/gunicorn-logfiles
- media:/chemie/media
- static:/chemie/static
depends_on:
- database
env_file: .env
expose:
- "8000"
# Builds nginx container
proxy:
container_name: hc_nginx
build: ./nginx
ports:
- "1339:80"
volumes:
- static:/code/static
- media:/code/media
links:
- website:website
# Builds backup container
backup:
build: ./backupjob
container_name: hc_backup
volumes:
- media:/code/media:ro
env_file: .env
links:
- database:database
# Mounted volumes persist beyond life of containers
volumes:
dbdata:
media:
static: