mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-2229] docker security fixes (#980)
* docker permission fixes * remove index.html edit permissions
This commit is contained in:
@@ -19,7 +19,7 @@ ARG GROUPID=1000
|
|||||||
ARG USERNAME=aca
|
ARG USERNAME=aca
|
||||||
ARG USERID=33009
|
ARG USERID=33009
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY ./docker/nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY ./docker/entrypoint.sh /
|
COPY ./docker/entrypoint.sh /
|
||||||
|
|
||||||
WORKDIR /usr/share/nginx/html
|
WORKDIR /usr/share/nginx/html
|
||||||
@@ -28,6 +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} /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 && \
|
||||||
|
@@ -52,10 +52,6 @@ if [[ $ACSURL ]]; then
|
|||||||
sed -i s%{protocol}//{hostname}{:port}%"$ACSURL"%g /usr/share/nginx/html/app.config.json
|
sed -i s%{protocol}//{hostname}{:port}%"$ACSURL"%g /usr/share/nginx/html/app.config.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $BASEPATH ]]; then
|
|
||||||
sed -i s%href=\"/\"%href=\""$BASEPATH"\"%g /usr/share/nginx/html/index.html
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "${APP_BASE_SHARE_URL}" ];then
|
if [ -n "${APP_BASE_SHARE_URL}" ];then
|
||||||
sed -e "s/\"baseShareUrl\": \".*\"/\"baseShareUrl\": \"${APP_BASE_SHARE_URL}\"/g" \
|
sed -e "s/\"baseShareUrl\": \".*\"/\"baseShareUrl\": \"${APP_BASE_SHARE_URL}\"/g" \
|
||||||
-i ./app.config.json
|
-i ./app.config.json
|
||||||
|
@@ -18,8 +18,6 @@ http {
|
|||||||
gzip_proxied expired no-cache no-store private auth;
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
|
||||||
access_log off;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
Reference in New Issue
Block a user