From 6de653534fd770ed291ebc5a209a46feb6b67018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Thu, 25 Jan 2018 12:22:32 +0100 Subject: [PATCH] Apply nginx reverse proxy to terminado's 7878 websocket --- Dockerfile | 2 +- src/nginx/sites-available/default | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eb67ffe..e394f93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,7 @@ ENV TFW_TERMINADO_PORT=7878 ENV TFW_PUBLIC_PORT=8888 ENV TFW_SUPERVISOR_HTTP_PORT=9001 -EXPOSE ${TFW_PUBLIC_PORT} ${TFW_TERMINADO_PORT} +EXPOSE ${TFW_PUBLIC_PORT} ENV TFW_EVENT_HANDLERS_DIR="/opt/event_handlers" ENV TFW_APP_DIR="/srv/app" diff --git a/src/nginx/sites-available/default b/src/nginx/sites-available/default index 0fd62dc..409c749 100644 --- a/src/nginx/sites-available/default +++ b/src/nginx/sites-available/default @@ -12,6 +12,13 @@ server { proxy_set_header Connection "Upgrade"; } + location = /terminal { + proxy_pass http://127.0.0.1:${TFW_TERMINADO_PORT}; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + location = /login { proxy_pass http://127.0.0.1:${TFW_LOGIN_APP_PORT}; }