-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (42 loc) · 937 Bytes
/
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
version: "3.7"
services:
postgresql:
image: "postgres"
container_name: "postgresql"
restart: "always"
expose:
- "5432"
volumes:
- "./postgresql/data:/var/lib/postgresql/data"
env_file: "./postgresql/.env"
backend:
build: "./backend/"
container_name: "django"
restart: "always"
expose:
- "8000"
env_file: "./backend/.env"
volumes:
- "./backend:/school/"
- "static_volume:/school/static"
- "media_volume:/school/media"
depends_on:
- "postgresql"
nginx:
build: "./nginx"
container_name: "nginx"
restart: "always"
ports:
- "80:80"
volumes:
- "./nginx/nginx.conf:/etc/nginx/conf.d/default.conf"
- "static_volume:/school/static"
- "media_volume:/school/media"
depends_on:
- "backend"
- "postgresql"
volumes:
static_volume:
external: true
media_volume:
external: true