From bf5d1544b636ad5b5d86eb2c96cd562824dd9594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Mar=C4=8Deti=C4=87?= Date: Fri, 16 Mar 2018 13:52:51 +0100 Subject: [PATCH] Fixed docker composition (#187) Signed-off-by: nmarcetic --- docker/docker-compose.yml | 4 ++++ docker/nginx.conf | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 7574e08f..0ba60aed 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -39,6 +39,8 @@ services: POSTGRES_USER: mainflux POSTGRES_PASSWORD: mainflux POSTGRES_DB: mainflux + ports: + - "5432:5432" manager: image: mainflux/manager:latest @@ -89,3 +91,5 @@ services: MQTT_ADAPTER_NATS_URL: "nats://nats:4222" AUTH_URL: "http://manager" AUTH_PORT: 8180 + ports: + - "1883:1883" diff --git a/docker/nginx.conf b/docker/nginx.conf index 4c569de3..a8f6ff4a 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -69,9 +69,10 @@ http { server { listen 80 default_server; listen [::]:80 default_server; - server_name localhost; - return 302 https://$server_name$request_uri; + access_log off; + error_log off; + return 301 https://$server_name$request_uri; } # HTTPS @@ -132,7 +133,7 @@ http { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://docker-manager/; + proxy_pass http://docker-manager; # Allow OPTIONS method CORS if ($request_method = OPTIONS ) {