From 2565be851b50d3202fc32ae175d4b78e180dcb1f Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Mon, 9 Oct 2017 09:01:44 -0400 Subject: [PATCH] Convert to version 3 syntax --- docker-compose.yml | 84 ++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 35238e5..1336ad9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,43 +1,47 @@ -web: - restart: always - build: ./web - expose: - - "8000" - links: - - postgres:postgres - - redis:redis - volumes: - - /usr/src/app - - /usr/src/app/static - env_file: .env - environment: - DEBUG: 'true' - command: /usr/local/bin/gunicorn docker_django.wsgi:application -w 2 -b :8000 +version: '3' +services: + web: + restart: always + build: ./web + expose: + - "8000" + links: + - postgres:postgres + - redis:redis + volumes: + - /usr/src/app + - /usr/src/app/static + env_file: .env + environment: + DEBUG: 'true' + command: /usr/local/bin/gunicorn docker_django.wsgi:application -w 2 -b :8000 -nginx: - restart: always - build: ./nginx/ - ports: - - "80:80" - volumes: - - /www/static - volumes_from: - - web - links: - - web:web + nginx: + restart: always + build: ./nginx/ + ports: + - "80:80" + volumes: + - /www/static + links: + - web:web -postgres: - restart: always - image: postgres:latest - ports: - - "5432:5432" - volumes: - - pgdata:/var/lib/postgresql/data/ + postgres: + restart: always + image: postgres:latest + ports: + - "5432:5432" + volumes: + - pgdata:/var/lib/postgresql/data/ -redis: - restart: always - image: redis:latest - ports: - - "6379:6379" - volumes: - - redisdata:/data \ No newline at end of file + redis: + restart: always + image: redis:latest + ports: + - "6379:6379" + volumes: + - redisdata:/data +volumes: + web: + pgdata: + redisdata: