-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.stage.yml
54 lines (50 loc) · 1.13 KB
/
docker-compose.stage.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
# Docker compose for Digital Ocean Production Server (DEMO)
version: "3.3"
services:
django:
restart: always
image: "${DJANGO_IMAGE}"
container_name: django
command: gunicorn photoshare.wsgi:application --worker-tmp-dir /dev/shm --workers=2 --threads=4 --worker-class=gthread --log-file=- --bind 0.0.0.0:8000
expose:
- 8000
env_file:
- .env.stage
volumes:
- static:/srv/app/static
- media:/srv/app/media
depends_on:
- db
- redis
db:
restart: always
image: postgres:9.6.22-buster
container_name: db
restart: always
ports:
- "5432:5432"
env_file:
- .env.stage
redis:
image: redis:alpine
container_name: redis
ports:
- 6379:6379
nginx-proxy:
image: "${NGINX_IMAGE}"
container_name: nginx-proxy
ports:
- 443:443
- 80:80
volumes:
- static:/srv/app/static
- media:/srv/app/media
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
- django
volumes:
static:
media: