-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
88 lines (79 loc) · 2.18 KB
/
docker-compose.prod.yml
File metadata and controls
88 lines (79 loc) · 2.18 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: '3'
services:
db:
image: postgres
container_name: hack_db
environment:
- POSTGRES_DB=hack_db_prod
- POSTGRES_USER=hack_user
- POSTGRES_PASSWORD=crazy_unicorn
volumes:
- postgres_data:/var/lib/postgresql/data/
web:
container_name: hack_app
build:
context: .
dockerfile: Dockerfile.prod
command: gunicorn hack21.wsgi:application --bind 0.0.0.0:8000 --env DJANGO_SETTINGS_MODULE=hack21.settings.production
# command: python manage.py runserver 0.0.0.0:8000
# command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
- static_volume:/code/staticfiles
- media_volume:/code/mediafiles
# ports:
# - "8000:8000"
expose:
- 8000
depends_on:
- db
env_file:
- .env.prod
nginx:
build: ./nginx
restart: always
container_name: hack_nginx
ports:
- 80:80
volumes:
- static_volume:/code/staticfiles
- media_volume:/code/mediafiles
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- vhost:/etc/nginx/vhost.d
depends_on:
- web
# nginx-proxy:
# container_name: nginx-proxy
# build: nginx
# restart: always
# ports:
# - 443:443
# - 80:80
# volumes:
# - static_volume:/code/staticfiles
# - media_volume:/code/mediafiles
# - certs:/etc/nginx/certs
# - html:/usr/share/nginx/html
# - vhost:/etc/nginx/vhost.d
# - /var/run/docker.sock:/tmp/docker.sock:ro
# depends_on:
# - web
# nginx-proxy-letsencrypt:
# image: jrcs/letsencrypt-nginx-proxy-companion
# env_file:
# - .env.proxy-companion
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro
# - certs:/etc/nginx/certs
# - html:/usr/share/nginx/html
# - vhost:/etc/nginx/vhost.d
# depends_on:
# - nginx-proxy
volumes:
postgres_data:
static_volume:
media_volume:
html:
vhost: