forked from django/djangosnippets.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (38 loc) · 943 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'
services:
db:
image: postgres:12.3
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_DB=djangosnippets
volumes:
- postgresdata:/var/lib/postgresql/data
web:
build: .
environment:
- REDISTOGO_URL=${REDISTOGO_URL}
- SECRET_KEY=${SECRET_KEY}
- DEBUG=${DEBUG}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- DATABASE_URL=${DATABASE_URL}
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
- SEARCHBOX_SSL_URL=${SEARCHBOX_SSL_URL}
- SESSION_COOKIE_SECURE=${SESSION_COOKIE_SECURE}
command: gunicorn djangosnippets.wsgi:application -b 0.0.0.0:8000 --log-level debug -k gevent -w 2
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
- redis
redis:
restart: always
image: redis:3.2.12
ports:
- "6379:6379"
volumes:
- redisdata:/data
volumes:
redisdata:
postgresdata: