From 6a03f0d0b224de9592a3c10f163f71dcba4e6e4c Mon Sep 17 00:00:00 2001 From: Ben Rometsch Date: Thu, 9 Jul 2020 16:13:01 +0100 Subject: [PATCH] Added redis. Updated API ports --- docker-compose.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0615630..a2d8613 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,24 +1,31 @@ -version: '3' +version: "3" services: db: image: postgres:10.6-alpine environment: POSTGRES_PASSWORD: password POSTGRES_DB: bullettrain + container_name: bullettrain_postgres + redis: + image: redis:alpine + ports: + - "6379:6379" + container_name: bullettrain_redis api: image: bullettrain/api:latest environment: - DJANGO_DB_NAME: bullettrain - DJANGO_DB_USER: postgres - DJANGO_DB_PASSWORD: password - DJANGO_DB_PORT: 5432 DJANGO_ALLOWED_HOSTS: localhost + DATABASE_URL: postgresql://postgres:password@db:5432/bullettrain + REDIS_URL: redis://redis:6379/ ports: - - "8000:8000" + - "8000:80" depends_on: - db + - redis links: - db:db + - redis:redis + container_name: bullettrain_api frontend: image: bullettrain/frontend:latest environment: @@ -28,4 +35,4 @@ services: - "8080:8080" links: - api:api - \ No newline at end of file + container_name: bullettrain_frontend