Permalink
Browse files

Proxy can be used in front of any service

  • Loading branch information...
christianbauer committed Nov 9, 2017
1 parent ad2366a commit a2147f3a538d073fa64b7b9d130a737f6f82f77e
Showing with 10 additions and 16 deletions.
  1. +5 −13 profile/deploy.yml
  2. +2 −0 proxy/Dockerfile
  3. +3 −3 proxy/haproxy.cfg
View
@@ -35,11 +35,15 @@ services:
#DOMAINNAME: localhost
# Provide your own email address for your SSL certificates!
LE_EMAIL: 'devnull@openremote.io'
LE_EMAIL: 'no-reply@openremote.io'
# --staging requests fake certificates to avoid hitting limits during testing
#LE_EXTRA_ARGS: '--staging --logs-dir=/etc/letsencrypt'
# Traffic should be forwarded to this service
PROXY_BACKEND_HOST: manager
PROXY_BACKEND_PORT: 8080
# Customize log output
PROXY_LOGLEVEL: 'notice'
@@ -56,9 +60,6 @@ services:
options:
max-size: 10m
# Always restart the service
restart: on-failure
# The API gateway and Manager web application.
manager:
@@ -191,9 +192,6 @@ services:
options:
max-size: 10m
# Always restart the service
restart: always
# Keycloak identity provider
keycloak:
@@ -227,9 +225,6 @@ services:
options:
max-size: 10m
# Always restart the service
restart: always
# PostgreSQL DBMS
postgresql:
@@ -257,6 +252,3 @@ services:
logging:
options:
max-size: 10m
# Always restart the service
restart: always
View
@@ -12,6 +12,8 @@ ARG DOMAINNAME
ENV DOMAINNAME=${DOMAINNAME:-localhost}
ENV TERM xterm
ENV PROXY_LOGLEVEL notice
ENV PROXY_BACKEND_HOST manager
ENV PROXY_BACKEND_PORT 8080
RUN mkdir /tmp/lua && cd /tmp/lua \
&& curl -sSL https://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz -o lua.tar.gz \
View
@@ -43,7 +43,7 @@ frontend https
reqadd X-Forwarded-Proto:\ https
rspadd Strict-Transport-Security:\ max-age=15768000
use_backend manager_server
use_backend custom_backend
backend manager_server
server node1 manager:8080
backend custom_backend
server node1 "${PROXY_BACKEND_HOST}":"${PROXY_BACKEND_PORT}"

0 comments on commit a2147f3

Please sign in to comment.