swapnil-verma-gl 9148ccc6a9
[ACA-4679] Added code changes and env variables to enable DownloadPrompt and FileAutoDownload features on ACA (#3127)
* [ACA-4679] Added docker variables, app.config.json.tpl config and additional code for enabling non-responsive file preview download and file auto download features in ACA

* [ACA-4679] Added defaults for downloadPrompt for viewer and fileAutoDownload features. Updated variable names from 'nonResponsiveDialog' to 'downloadPrompt'

* [ACA-4679] Added unit test cases for FileAutoDownloadService

* [ACA-4679] Updated env variable references from NonResponsiveDialog to DownloadPrompt

* [ACA-4679] Added missing licence header on new files

* [ACA-4679] Added env variable configuration for GithubActions jobs

* [ACA-4679] Added env variable configuration for GithubActions jobs

* [ACA-4679] Removed unneeded env variable configuration for GithubActions jobs

* [ACA-4679] Updated .env file configuration in README.md
2023-04-20 18:14:13 -04:00

62 lines
2.1 KiB
Docker

# 1. Generate licenses
FROM node:16.13-alpine3.14 AS builder
WORKDIR /usr/src/alfresco
COPY package.json package.json
# RUN mkdir -p ./licenses && \
# yarn licenses list --production > ./licenses/licenses.txt && \
# yarn licenses generate-disclaimer --production > ./licenses/disclaimer.txt
# 2. Generate image
FROM nginxinc/nginx-unprivileged:1.21-alpine
USER root
RUN apk update && apk upgrade
USER 101
ARG PROJECT_NAME
ARG PROVIDER="ECM"
ARG AUTH_TYPE="BASIC"
ENV APP_CONFIG_PROVIDER=$PROVIDER
ENV APP_CONFIG_AUTH_TYPE=$AUTH_TYPE
ENV APP_CONFIG_OAUTH2_HOST="{protocol}//{hostname}{:port}/auth/realms/alfresco"
ENV APP_CONFIG_BPM_HOST="{protocol}//{hostname}{:port}"
ENV APP_CONFIG_ECM_HOST="{protocol}//{hostname}{:port}"
ENV APP_CONFIG_OAUTH2_CLIENTID="alfresco"
ENV APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true
ENV APP_CONFIG_OAUTH2_SILENT_LOGIN=true
ENV APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="{protocol}//{hostname}{:port}/assets/silent-refresh.html"
ENV APP_CONFIG_OAUTH2_REDIRECT_LOGIN="/"
ENV APP_CONFIG_OAUTH2_REDIRECT_LOGOUT="/"
ENV APP_CONFIG_PLUGIN_AOS=true
ENV APP_CONFIG_PLUGIN_FOLDER_RULES=true
ENV APP_CONFIG_PLUGIN_CONTENT_SERVICE=true
ENV APP_CONFIG_ENABLE_MOBILE_APP_SWITCH=true
ENV APP_CONFIG_SESSION_TIME_FOR_OPEN_APP_DIALOG_DISPLAY_IN_HOURS="12"
ENV APP_CONFIG_ENABLE_DOWNLOAD_PROMPT=true
ENV APP_CONFIG_ENABLE_DOWNLOAD_PROMPT_REMINDERS=true
ENV APP_CONFIG_DOWNLOAD_PROMPT_DELAY=50
ENV APP_CONFIG_DOWNLOAD_PROMPT_REMINDER_DELAY=30
ENV APP_CONFIG_ENABLE_FILE_AUTO_DOWNLOAD=true
ENV APP_CONFIG_FILE_AUTO_DOWNLOAD_SIZE_THRESHOLD_IN_MB=15
COPY docker/default.conf.template /etc/nginx/templates/
COPY docker/docker-entrypoint.d/* /docker-entrypoint.d/
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/assets/app.extensions.json /etc/nginx/templates/app.extensions.json.template
# COPY --from=builder /usr/src/alfresco/licenses /usr/share/nginx/html/
USER root
RUN chmod a+w -R /etc/nginx/conf.d
USER 101
ENV BASE_PATH=/
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d