Browse Source

Phase III Task 2

master
Yutsuo 7 years ago
parent
commit
77baafa17e
  1. 8
      docker-compose.yml
  2. 12
      nginx/nginx.conf
  3. 2
      node/app.js

8
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:

12
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;
# }
}
}

2
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');

Loading…
Cancel
Save