-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (70 loc) · 1.48 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
61
62
63
64
65
66
67
68
69
70
71
# 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/external:/usr/src/app/external"
# - "./apps/myapp1:/usr/src/app/myapp1"
# - "./apps/myapp2:/usr/src/app/myapp2"
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}"
media:
image: "httpd:latest"
volumes:
- "./media:/usr/local/apache2/htdocs"
ports:
- "80"
environment:
- "VIRTUAL_HOST=${MEDIA_HOST}"
static:
image: "httpd:latest"
volumes:
- "./static:/usr/local/apache2/htdocs"
ports:
- "80"
environment:
- "VIRTUAL_HOST=${STATIC_HOST}"