Commit 20c0f643 authored by Baptiste Mesta's avatar Baptiste Mesta Committed by GitHub
Browse files

feat(docker): avoid web.xml duplication for http api (#341)

The web.xml was here only to deactivate http api. use env property instead.

Closes [RUNTIME-223](https://bonitasoft.atlassian.net/browse/RUNTIME-223)
parent 3a582741
......@@ -41,6 +41,7 @@ ENV BONITA_SHA256 ${BONITA_SHA256:-5342b18dd7f93bd3b2b64f8587504d0bf324f4f84d42
ENV ZIP_FILE BonitaCommunity-${BRANDING_VERSION}.zip
ENV BASE_URL ${BASE_URL:-https://github.com/bonitasoft/bonita-platform-releases/releases/download}
ENV BONITA_URL ${BONITA_URL:-${BASE_URL}/${BRANDING_VERSION}/BonitaCommunity-${BRANDING_VERSION}.zip}
ENV HTTP_API false
RUN echo "Downloading Bonita from url: ${BONITA_URL}"
RUN mkdir /opt/files
......
This diff is collapsed.
......@@ -12,8 +12,6 @@ ENSURE_DB_CHECK_AND_CREATION=${ENSURE_DB_CHECK_AND_CREATION:-true}
JAVA_OPTS=${JAVA_OPTS:--Xms1024m -Xmx1024m}
# Flag to enable or not dynamic authorization checking on Bonita REST API
REST_API_DYN_AUTH_CHECKS=${REST_API_DYN_AUTH_CHECKS:-true}
# Flag to enable or not Bonita HTTP API
HTTP_API=${HTTP_API:-false}
# retrieve the db parameters from the container linked
if [ -n "$POSTGRES_PORT_5432_TCP_PORT" ]
......@@ -109,12 +107,6 @@ if [ "$REST_API_DYN_AUTH_CHECKS" = 'true' ]
then
sed -i -e 's/^#GET|/GET|/' -e 's/^#POST|/POST|/' -e 's/^#PUT|/PUT|/' -e 's/^#DELETE|/DELETE|/' ${BONITA_PATH}/BonitaCommunity-${BRANDING_VERSION}/setup/platform_conf/initial/tenant_template_portal/dynamic-permissions-checks-custom.properties
fi
# if required, deactivate HTTP API by updating bonita.war with proper web.xml
if [ "$HTTP_API" = 'false' ]
then
cd ${BONITA_FILES}/
zip ${BONITA_PATH}/BonitaCommunity-${BRANDING_VERSION}/server/webapps/bonita.war WEB-INF/web.xml
fi
# replace variables
find ${BONITA_PATH}/BonitaCommunity-${BRANDING_VERSION}/setup/platform_conf/initial -name "*.properties" | xargs -n10 sed -i \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment