Fix app.config.json expansion (#1826)

This commit is contained in:
Marcello Teodori 2020-11-27 03:07:45 +01:00 committed by GitHub
parent e88141ccdf
commit c2a802fe3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 9 deletions

7
docker/build.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
echo building $1
npm clean-install
npm run build $*

View File

@ -93,10 +93,9 @@ fi
# application specific ce replacements
if [ -n "${APP_BASE_SHARE_URL}" ];then
if [ -n "${APP_BASE_SHARE_URL}" ]; then
replace="\/"
encoded=${APP_BASE_SHARE_URL//\//$replace}
sed -e "s/\"baseShareUrl\": \".*\"/\"baseShareUrl\": \"${encoded}\"/g" \
-i /tmp/app.config.json && \
cat /tmp/app.config.json > ./app.config.json
-i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
fi

View File

@ -2,4 +2,10 @@
set -e
env PROJECT_NAME=app BASE_PATH=/workspace DOCKER_IMAGE_REPO=alfresco/alfresco-content-app $(dirname "$0")/run.sh
[[ "$BUILD_ENABLED" == "true" ]] && $(dirname $0)/build.sh
env \
PROJECT_NAME=app \
BASE_PATH=/workspace \
DOCKER_IMAGE_REPO=alfresco/alfresco-content-app \
$(dirname $0)/run.sh

View File

@ -2,11 +2,6 @@
set -e
if [[ "$BUILD_ENABLED" == "true" ]]
then
npm clean-install
npm run build
fi
docker rmi -f $DOCKER_IMAGE_REPO
docker build --build-arg PROJECT_NAME=$PROJECT_NAME -t $DOCKER_IMAGE_REPO .
echo http://localhost:8080$BASE_PATH