-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (45 loc) · 964 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
47 lines (45 loc) · 964 Bytes
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
version: '2'
services:
nginx:
image: nginx:latest
container_name: nginx
ports:
- "8000:8000"
volumes:
- .:/usr/src/app/
- ./nginx_files:/etc/nginx/conf.d
- ./static:/usr/share/nginx/html
depends_on:
- web
web:
build: .
container_name: django
depends_on:
- db
volumes:
- static_volume:/usr/src/app/staticfiles
- media_volume:/usr/src/app/mediafiles
expose:
- "8000"
environment:
- SQL_DATABASE=inventory
- SQL_USER=rgalaz
- SQL_PASSWORD=rgalaz2019
- SQL_HOST=db
- SQL_PORT=5432
- DATABASE=postgres
db:
container_name: postgres
ports:
- 5432:5432
image: postgres:latest
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=rgalaz
- POSTGRES_PASSWORD=rgalaz2019
- POSTGRES_DB=inventory
volumes:
postgres_data:
static_volume:
media_volume: