Apply nginx reverse proxy to terminado's 7878 websocket

This commit is contained in:
Kristóf Tóth 2018-01-25 12:22:32 +01:00
parent 9ad2a53a51
commit 6de653534f
2 changed files with 8 additions and 1 deletions

View File

@ -48,7 +48,7 @@ ENV TFW_TERMINADO_PORT=7878
ENV TFW_PUBLIC_PORT=8888 ENV TFW_PUBLIC_PORT=8888
ENV TFW_SUPERVISOR_HTTP_PORT=9001 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_EVENT_HANDLERS_DIR="/opt/event_handlers"
ENV TFW_APP_DIR="/srv/app" ENV TFW_APP_DIR="/srv/app"

View File

@ -12,6 +12,13 @@ server {
proxy_set_header Connection "Upgrade"; 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 { location = /login {
proxy_pass http://127.0.0.1:${TFW_LOGIN_APP_PORT}; proxy_pass http://127.0.0.1:${TFW_LOGIN_APP_PORT};
} }