Skip to content

Commit 5034afb

Browse files
committed
Merge branch 'master' of github.com:sebastienpro/Quizz
2 parents 5a17e3a + 189b3ab commit 5034afb

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:18.04
22

33
RUN apt-get update && apt-get install -y git python3-dev curl netcat python3-pip
44

Quizz/settings.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@
9292
}
9393
}
9494

95+
REDIS = {
96+
'host': os.environ.get('REDIS_HOST', 'localhost'),
97+
'port': int(os.environ.get('REDIS_PORT', 6379)),
98+
'database': os.environ.get('REDIS_DATABASE', 1),
99+
}
100+
95101

96102
# Password validation
97103
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators

docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ services:
44
build: ./
55
ports:
66
- "8000"
7+
environment:
8+
- REDIS_HOST=redis
79
volumes:
810
- "./:/usr/src/app"
911
labels:
@@ -34,6 +36,11 @@ services:
3436
volumes:
3537
- "./pgVolume:/var/lib/postgresql/data"
3638

39+
redis:
40+
image: "redis"
41+
ports:
42+
- "6379:6379"
43+
3744
traefik:
3845
image: containous/traefik:latest
3946
ports:

0 commit comments

Comments
 (0)