mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-24 14:31:16 +00:00
AAE-4023 fix BASE_PATH as / (#1831)
This commit is contained in:
@@ -19,10 +19,11 @@ COPY docker/docker-entrypoint.d/* /docker-entrypoint.d/
|
|||||||
|
|
||||||
COPY dist/$PROJECT_NAME /usr/share/nginx/html/
|
COPY dist/$PROJECT_NAME /usr/share/nginx/html/
|
||||||
COPY dist/$PROJECT_NAME/app.config.json /etc/nginx/templates/app.config.json.template
|
COPY dist/$PROJECT_NAME/app.config.json /etc/nginx/templates/app.config.json.template
|
||||||
|
COPY --from=builder /usr/src/alfresco/licenses /usr/share/nginx/html/
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN chmod a+w -R /etc/nginx/conf.d
|
RUN chmod a+w -R /etc/nginx/conf.d
|
||||||
USER 101
|
USER 101
|
||||||
|
|
||||||
ENV BASE_PATH=/$PROJECT_NAME
|
ENV BASE_PATH=/
|
||||||
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d
|
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d
|
||||||
|
@@ -7,20 +7,16 @@ server {
|
|||||||
|
|
||||||
rewrite ^([^.]*[^/])$ $1/ permanent;
|
rewrite ^([^.]*[^/])$ $1/ permanent;
|
||||||
|
|
||||||
location / {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html index.htm;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /app.config.json {
|
|
||||||
root ${NGINX_ENVSUBST_OUTPUT_DIR};
|
|
||||||
}
|
|
||||||
|
|
||||||
location ${BASE_PATH} {
|
location ${BASE_PATH} {
|
||||||
|
set $EVAL_BASE_PATH "${BASE_PATH}";
|
||||||
|
if ($EVAL_BASE_PATH = "/") {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
}
|
||||||
|
index index.html index.htm;
|
||||||
alias /usr/share/nginx/html;
|
alias /usr/share/nginx/html;
|
||||||
}
|
}
|
||||||
|
|
||||||
location = ${BASE_PATH}/app.config.json {
|
location ~ /app.config.json {
|
||||||
alias ${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json;
|
alias ${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -6,6 +6,6 @@ set -e
|
|||||||
|
|
||||||
env \
|
env \
|
||||||
PROJECT_NAME=app \
|
PROJECT_NAME=app \
|
||||||
BASE_PATH=/workspace \
|
BASE_PATH=${BASE_PATH:-/workspace} \
|
||||||
DOCKER_IMAGE_REPO=alfresco/alfresco-content-app \
|
DOCKER_IMAGE_REPO=alfresco/alfresco-content-app \
|
||||||
$(dirname $0)/run.sh
|
$(dirname $0)/run.sh
|
||||||
|
Reference in New Issue
Block a user