Introduce new SERVER_PATH variable. Create Readme.md for docker information (#1254)

This commit is contained in:
Martin Muller 2019-11-22 11:11:39 +01:00 committed by GitHub
parent 4175471c01
commit 236d80106d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 2 deletions

View File

@ -28,8 +28,7 @@ COPY --from=builder /usr/src/alfresco/licenses ./licenses
RUN addgroup -g ${GROUPID} ${GROUPNAME} && \ RUN addgroup -g ${GROUPID} ${GROUPNAME} && \
adduser -S -u ${USERID} -G ${GROUPNAME} -s "/bin/bash" ${USERNAME} && \ adduser -S -u ${USERID} -G ${GROUPNAME} -s "/bin/bash" ${USERNAME} && \
chown -R ${USERNAME}:${GROUPNAME} ./app.config.json && \ chown -R ${USERNAME}:${GROUPNAME} /usr/share/nginx/html && \
chown -R ${USERNAME}:${GROUPNAME} ./index.html && \
chown -R ${USERNAME}:${GROUPNAME} /var/cache/nginx && \ chown -R ${USERNAME}:${GROUPNAME} /var/cache/nginx && \
touch /var/run/nginx.pid && \ touch /var/run/nginx.pid && \
chown -R ${USERNAME}:${GROUPNAME} /var/run/nginx.pid && \ chown -R ${USERNAME}:${GROUPNAME} /var/run/nginx.pid && \

20
docker/Readme.md Normal file
View File

@ -0,0 +1,20 @@
# ACA Docker Image
Docker images are released to [docker hub](https://hub.docker.com/r/alfresco/alfresco-content-app)
## Environment Variables
OAUTH2:
- APP_CONFIG_AUTH_TYPE: ...
- APP_CONFIG_OAUTH2_HOST: ...
- APP_CONFIG_OAUTH2_CLIENTID: ...
- APP_CONFIG_OAUTH2_REDIRECT_LOGIN: ...
- APP_CONFIG_OAUTH2_REDIRECT_LOGOUT: ...
- APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI: ...
APP Misc:
- BASE_PATH: ...
- APP_BASE_SHARE_URL: ...
- SERVER_PATH: Server path (usefull if behind a reverse proxy). E.g.: `/content-app` . Defaults to `/`

View File

@ -81,4 +81,13 @@ if [ -n "${APP_BASE_SHARE_URL}" ];then
cat /tmp/app.config.json > ./app.config.json cat /tmp/app.config.json > ./app.config.json
fi fi
if [[ $SERVER_PATH ]]; then
mkdir -p .$SERVER_PATH
cp -R * .$SERVER_PATH
replace="\/"
encoded=${SERVER_PATH//\//$replace}
sed -ri 's%href=".?/"%href="'$encoded/'"%g' /tmp/index.html && \
cat /tmp/index.html > .$SERVER_PATH/index.html
fi
nginx -g "daemon off;" nginx -g "daemon off;"