From b6afbd31ebf399ad678e8b2459ca10f968f5b3ac Mon Sep 17 00:00:00 2001 From: Edi Santoso Date: Sun, 22 Oct 2017 00:32:01 +0700 Subject: [PATCH] update nginx to use reverse proxies in production --- docker-compose-prod.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index db27f5f..c2bdcd3 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -36,8 +36,30 @@ services: restart: always ports: - 80:80 + depends_on: + users-service: + condition: service_started + web-service: + condition: service_started + links: + - users-service + - web-service + + + web-service: + container_name: web-service + build: + context: https://github.com/repodevs/flask-microservices-client.git + args: + - NODE_ENV=production + - REACT_APP_USERS_SERVICE_URL=${REACT_APP_USERS_SERVICE_URL} + ports: + - '9000:9000' # expose ports - HOST:CONTAINER + environment: + - NODE_ENV=development + - REACT_APP_USERS_SERVICE_URL=${REACT_APP_USERS_SERVICE_URL} depends_on: users-service: condition: service_started links: - - users-service + - users-service