-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (52 loc) · 1.05 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
# docker-compose.yml
version: "3"
services:
proxy:
image: "jwilder/nginx-proxy:latest"
ports:
- "80:80"
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
db:
image: "postgres:11.4"
ports:
- "5432"
volumes:
- "./data:/var/lib/postgresql/data"
environment:
- "POSTGRES_USER"
- "POSTGRES_PASSWORD"
- "POSTGRES_DB"
app:
build: .
command:
[
"./wait-for-it/wait-for-it.sh",
"db:5432",
"--",
"python3",
"manage.py",
"runserver",
"0.0.0.0:8000",
]
volumes:
- "./project:/usr/src/app/myproject"
- "./apps/api:/usr/src/app/api"
ports:
- "8000"
links:
- db
depends_on:
- db
environment:
- "DJANGO_USE_DEBUG"
- "DJANGO_USE_DEBUG_TOOLBAR"
- "SITE_HOST"
- "MEDIA_HOST"
- "STATIC_HOST"
- "POSTGRES_HOST=db"
- "POSTGRES_USER"
- "POSTGRES_PASSWORD"
- "POSTGRES_DB"
- "VIRTUAL_PORT=8000"
- "VIRTUAL_HOST=${SITE_HOST}"