mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
disable about and settings by default (#1868)
* disable about and settings by default * support docker variables * remove comments
This commit is contained in:
parent
42463179b5
commit
0ed0a10471
@ -19,6 +19,7 @@ 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 dist/$PROJECT_NAME/assets/app.extensions.json /etc/nginx/templates/app.extensions.json.template
|
||||||
COPY --from=builder /usr/src/alfresco/licenses /usr/share/nginx/html/
|
COPY --from=builder /usr/src/alfresco/licenses /usr/share/nginx/html/
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 8080;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
#charset koi8-r;
|
|
||||||
#access_log /var/log/nginx/host.access.log main;
|
|
||||||
|
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
|
|
||||||
rewrite ^([^.]*[^/])$ $1/ permanent;
|
rewrite ^([^.]*[^/])$ $1/ permanent;
|
||||||
@ -23,35 +19,12 @@ server {
|
|||||||
alias ${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json;
|
alias ${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json;
|
||||||
}
|
}
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
location ~ /assets/app.extensions.json {
|
||||||
|
alias ${NGINX_ENVSUBST_OUTPUT_DIR}/app.extensions.json;
|
||||||
|
}
|
||||||
|
|
||||||
# redirect server error pages to the static page /50x.html
|
|
||||||
#
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
location = /50x.html {
|
location = /50x.html {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
}
|
}
|
||||||
|
|
||||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
|
||||||
#
|
|
||||||
#location ~ \.php$ {
|
|
||||||
# proxy_pass http://127.0.0.1;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
|
||||||
#
|
|
||||||
#location ~ \.php$ {
|
|
||||||
# root html;
|
|
||||||
# fastcgi_pass 127.0.0.1:9000;
|
|
||||||
# fastcgi_index index.php;
|
|
||||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
|
||||||
# include fastcgi_params;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# deny access to .htaccess files, if Apache's document root
|
|
||||||
# concurs with nginx's one
|
|
||||||
#
|
|
||||||
#location ~ /\.ht {
|
|
||||||
# deny all;
|
|
||||||
#}
|
|
||||||
}
|
}
|
||||||
|
15
docker/docker-entrypoint.d/30-sed-on-app-extensions.sh
Executable file
15
docker/docker-entrypoint.d/30-sed-on-app-extensions.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo Running sed on "${NGINX_ENVSUBST_OUTPUT_DIR}/assets/app.extensions.json"
|
||||||
|
|
||||||
|
# modifies the "$ignoreReferenceList" property using a comma-delimited string
|
||||||
|
if [ -n "${APP_EXTENSIONS_IGNORE_REFS}" ]; then
|
||||||
|
echo "replace APP_EXTENSIONS_IGNORE_REFS"
|
||||||
|
|
||||||
|
replace="\/"
|
||||||
|
encoded=${APP_EXTENSIONS_IGNORE_REFS//\//$replace}
|
||||||
|
sed -e "s/\"$ignoreReferenceList\": \".*\"/\"$ignoreReferenceList\": \[${encoded}\]/g" \
|
||||||
|
-i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.extensions.json"
|
||||||
|
fi
|
@ -21,4 +21,5 @@ docker run --rm -it \
|
|||||||
--env APP_CONFIG_BPM_HOST=$APP_CONFIG_BPM_HOST \
|
--env APP_CONFIG_BPM_HOST=$APP_CONFIG_BPM_HOST \
|
||||||
--env APP_CONFIG_ECM_HOST=$APP_CONFIG_ECM_HOST \
|
--env APP_CONFIG_ECM_HOST=$APP_CONFIG_ECM_HOST \
|
||||||
--env APP_BASE_SHARE_URL=$APP_BASE_SHARE_URL \
|
--env APP_BASE_SHARE_URL=$APP_BASE_SHARE_URL \
|
||||||
|
--env APP_EXTENSIONS_IGNORE_REFS=$APP_EXTENSIONS_IGNORE_REFS \
|
||||||
--user 1000:1000 --publish $HOST_PORT:$CONTAINER_PORT $DOCKER_IMAGE_REPO
|
--user 1000:1000 --publish $HOST_PORT:$CONTAINER_PORT $DOCKER_IMAGE_REPO
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
"$runtime": "1.7.0",
|
"$runtime": "1.7.0",
|
||||||
"$description": "Core application extensions and features",
|
"$description": "Core application extensions and features",
|
||||||
"$references": [],
|
"$references": [],
|
||||||
|
"$ignoreReferenceList": ["about.plugin.json", "settings.plugin.json"],
|
||||||
|
|
||||||
"rules": [
|
"rules": [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user