diff --git a/Dockerfile b/Dockerfile index 21947d8..833943b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,7 @@ ENV BANSHO_BACKEND surveil ENV BANSHO_PROD true ENV BANSHO_SURVEIL_URL http://surveil:8080/ ENV BANSHO_ADAGIOS_URL http://demo.kaji-project.org/ +ENV BANSHO_AUTH_URL http://surveil:8080/v2/auth/ CMD ./configure.sh && \ cd /opt/bansho && \ diff --git a/container/000-default.conf b/container/000-default.conf index 39bfb1c..35976d8 100644 --- a/container/000-default.conf +++ b/container/000-default.conf @@ -9,6 +9,9 @@ ProxyPreserveHost On + ProxyPass /surveil/v2/auth/ http://surveil:8080/v2/auth/ + ProxyPassReverse /surveil/v2/auth/ http://surveil:8080/v2/auth/ + ProxyPass /surveil/ http://surveil:8080/ ProxyPassReverse /surveil/ http://surveil:8080/ diff --git a/container/configure.sh b/container/configure.sh index c6812b7..5fc8adf 100755 --- a/container/configure.sh +++ b/container/configure.sh @@ -5,9 +5,13 @@ CONFIG_FILE="/etc/apache2/sites-enabled/000-default.conf" echo "=> Configuring apache ProxyPass ..." # Surveil URLS -sed -i "s|ProxyPass /surveil/.*|ProxyPass /surveil/ ${BANSHO_SURVEIL_URL}|g" ${CONFIG_FILE} -sed -i "s|ProxyPassReverse /surveil/.*|ProxyPassReverse /surveil/ ${BANSHO_SURVEIL_URL}|g" ${CONFIG_FILE} +sed -i "s|ProxyPass /surveil/ .*|ProxyPass /surveil/ ${BANSHO_SURVEIL_URL}|g" ${CONFIG_FILE} +sed -i "s|ProxyPassReverse /surveil/ .*|ProxyPassReverse /surveil/ ${BANSHO_SURVEIL_URL}|g" ${CONFIG_FILE} # Adagios URLS sed -i "s|ProxyPass /adagios/.*|ProxyPass /adagios/ ${BANSHO_ADAGIOS_URL}|g" ${CONFIG_FILE} sed -i "s|ProxyPassReverse /adagios/.*|ProxyPassReverse /adagios/ ${BANSHO_ADAGIOS_URL}|g" ${CONFIG_FILE} + +# Bansho auth URL +sed -i "s|ProxyPass /surveil/v2/auth/.*|ProxyPass /surveil/v2/auth/ ${BANSHO_AUTH_URL}|g" ${CONFIG_FILE} +sed -i "s|ProxyPassReverse /surveil/v2/auth/.*|ProxyPass /surveil/v2/auth/ ${BANSHO_AUTH_URL}|g" ${CONFIG_FILE}