-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
60 lines (56 loc) · 1.47 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
services:
djangoapp:
build: .
env_file:
- config/db/database_env
- config/django_env
- .env
environment:
DOCKER_ENV: 'on'
S6_KILL_GRACETIME: 1
S6_CMD_WAIT_FOR_SERVICES_MAXTIME: 20000
volumes:
- requirements_volume:/opt/services/djangoapp/requirements
- static_volume:/opt/services/djangoapp/static
- media_volume:/opt/services/djangoapp/media
# these three are for a development environment:
- ./formative:/opt/services/djangoapp/src/formative
- ./templates:/opt/services/djangoapp/src/templates
- ./assets/bundles:/opt/services/djangoapp/src/assets/bundles
depends_on:
- database
- postfix
nginx:
image: nginx:1.21
ports:
- 8000:80
volumes:
- ./config/nginx/conf.d:/etc/nginx/conf.d
- static_volume:/opt/services/djangoapp/static
- media_volume:/opt/services/djangoapp/media
depends_on:
- djangoapp
database:
image: postgres:13
command: postgres -c shared_buffers=512MB
env_file:
- config/db/database_env
- .env
ports:
# a port map for the development environment:
- 5432:5432
volumes:
- database_volume:/var/lib/postgresql/data
postfix:
image: juanluisbaptiste/postfix:1.3
env_file:
- config/postfix_env
- .env
volumes:
- postfix_volume:/var/spool/postfix
volumes:
database_volume:
requirements_volume:
static_volume:
media_volume:
postfix_volume: