Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ES-761] theme configuration with artifactory #584

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions oidc-ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ ENV work_dir=${nginx_dir}/html

ENV i18n_path=${work_dir}/locales

ENV theme_path=${work_dir}/theme

ENV plugins_path=${nginx_dir}/html/plugins

ENV plugins_format=iife
Expand All @@ -77,8 +79,8 @@ WORKDIR /home/${container_user}
# install packages and create user
RUN groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \
&& mkdir -p /var/run/nginx /var/tmp/nginx ${i18n_path} ${plugins_path} ${plugins_path}/temp \
&& chown -R ${container_user}:${container_user} /usr/share/nginx /var/run/nginx /var/tmp/nginx ${i18n_path} ${plugins_path} ${plugins_path}/temp
&& mkdir -p /var/run/nginx /var/tmp/nginx ${i18n_path} ${theme_path} ${plugins_path} ${plugins_path}/temp \
&& chown -R ${container_user}:${container_user} /usr/share/nginx /var/run/nginx /var/tmp/nginx ${i18n_path} ${theme_path} ${plugins_path} ${plugins_path}/temp

ADD configure_start.sh configure_start.sh

Expand All @@ -89,7 +91,12 @@ COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
# copy build files to nginx html directory
COPY --from=build_esignet_ui /build ${work_dir}

RUN echo "DEFAULT_THEME=$DEFAULT_THEME" >> ${work_dir}/env.env && echo "DEFAULT_LANG=$DEFAULT_LANG" >> ${work_dir}/env.env && echo "DEFAULT_WELLKNOWN=$DEFAULT_WELLKNOWN" >> ${work_dir}/env.env && echo "DEFAULT_FEVICON=$DEFAULT_FEVICON" >> ${work_dir}/env.env env && echo "DEFAULT_TITLE=$DEFAULT_TITLE" >> ${work_dir}/env.env && echo "DEFAULT_ID_PROVIDER_NAME=$DEFAULT_ID_PROVIDER_NAME" >> ${work_dir}/env.env
RUN echo "DEFAULT_THEME=$DEFAULT_THEME" >> ${work_dir}/env.env \
&& echo "DEFAULT_LANG=$DEFAULT_LANG" >> ${work_dir}/env.env \
&& echo "DEFAULT_WELLKNOWN=$DEFAULT_WELLKNOWN" >> ${work_dir}/env.env \
&& echo "DEFAULT_FEVICON=$DEFAULT_FEVICON" >> ${work_dir}/env.env env \
&& echo "DEFAULT_TITLE=$DEFAULT_TITLE" >> ${work_dir}/env.env \
&& echo "DEFAULT_ID_PROVIDER_NAME=$DEFAULT_ID_PROVIDER_NAME" >> ${work_dir}/env.env

RUN chown -R ${container_user}:${container_user} /home/${container_user}

Expand Down
13 changes: 13 additions & 0 deletions oidc-ui/configure_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ chmod 775 $i18n_path/*

cd $i18n_path
unzip -o esignet-i18n-bundle.zip
rm esignet-i18n-bundle.zip

#theme bundle
echo "Downloading theme bundle files"
wget --no-check-certificate --no-cache --no-cookies $artifactory_url_env/artifactory/libs-release-local/theme/esignet-theme.zip -O $theme_path/esignet-theme.zip

echo "unzip i18n bundle files.."
chmod 775 $theme_path/*

cd $theme_path
unzip -o esignet-theme.zip
rm esignet-theme.zip

#sign-in-button-plugin
echo "Downloading plugins"
Expand All @@ -23,6 +35,7 @@ wget --no-check-certificate --no-cache --no-cookies $SIGN_IN_WITH_ESIGNET_PLUGIN
echo "unzip plugins.."
cd $plugins_path/temp
unzip -o sign-in-button-plugin.zip
rm sign-in-button-plugin.zip

#move the required js file
mv $plugins_path/temp/sign-in-with-esignet/$plugins_format/index.js $plugins_path/sign-in-button-plugin.js
Expand Down
2 changes: 1 addition & 1 deletion oidc-ui/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!-- runtime config -->
<script src="%PUBLIC_URL%/env-config.js"></script>
<script defer src="%PUBLIC_URL%/theme-config.js"></script>
<link rel="stylesheet" href="%PUBLIC_URL%/variables.css">
<link rel="stylesheet" href="%PUBLIC_URL%/theme/variables.css">
<!-- runtime config -->

<title id="title">e-Signet</title>
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion oidc-ui/src/constants/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const AUTHCODE = "/authorization/auth-code";
export const CSRF = "/csrf/token";

// Config endpoint
export const CONFIG = "/config.json";
export const CONFIG = "/theme/config.json";

// Language endpoint
export const DEFAULT_CONFIG = "/locales/default.json";
Expand Down
Loading