From 77baafa17ea0e50e102061045f5d46a353ea7e7f Mon Sep 17 00:00:00 2001 From: Yutsuo Date: Thu, 13 Dec 2018 13:10:12 -0200 Subject: [PATCH] Phase III Task 2 --- docker-compose.yml | 8 ++++---- nginx/nginx.conf | 12 ------------ node/app.js | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index beed319..a087b14 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,10 +16,10 @@ services: container_name: nginx2 restart: always image: nginx - ports: - - "8080:8000" - environment: - - NGINX_PORT=8000 + expose: + - "80" + networks: + - network_1 app: container_name: app # depends_on: diff --git a/nginx/nginx.conf b/nginx/nginx.conf index ea6a2c6..44ce238 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -4,12 +4,8 @@ events { worker_connections 1024; } http { - sendfile on; - upstream app { server app:3001; - server prometheus:9090; - server grafana:3000; } server { @@ -18,13 +14,5 @@ http { location / { proxy_pass http://app; } - - # location /prometheus { - # proxy_pass http://prometheus; - # } - - # location /grafana { - # proxy_pass http://grafana; - # } } } \ No newline at end of file diff --git a/node/app.js b/node/app.js index 819a76b..b3675af 100755 --- a/node/app.js +++ b/node/app.js @@ -137,7 +137,7 @@ app.post('/info/add/:name', function(req, res){ res.send('color ' + req.params.name + ' added to database'); }); -// connectWithRetry(); +connectWithRetry(); app.listen(3001, () => { console.log('Server running on port 3001');