-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
webui: prepare containers with NextJS
- Loading branch information
Showing
4 changed files
with
64 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,31 @@ | ||
[rucio_endpoint] | ||
REACT_APP_RUCIO_HOST = {{ RUCIO_HOST | default('https://rucio-host-not-defined') }} | ||
|
||
[login_page_org_images] | ||
{% if WEBUI_LOGIN_PAGE_IMAGE_PRIMARY is defined %} | ||
REACT_APP_login_page_image_primary = {{ WEBUI_LOGIN_PAGE_IMAGE_PRIMARY }} | ||
{% endif %} | ||
{% if WEBUI_LOGIN_PAGE_IMAGE_SECONDARY is defined %} | ||
REACT_APP_login_page_image_secondary = {{ WEBUI_LOGIN_PAGE_IMAGE_SECONDARY }} | ||
{% endif %} | ||
[public] | ||
NEXT_PUBLIC_WEBUI_HOST = {{ RUCIO_HOST | default('https://rucio-host-not-defined') }} | ||
|
||
[meta] | ||
PROJECT_NAME = {{PROJECT_NAME | default('https://atlas.cern/')}} | ||
|
||
[session] | ||
SESSION_PASSWORD = {{SESSION_PASSWORD | default('2gyZ3GDw3LHZQKDhPmPDL3sjREVRXPr8')}} | ||
SESSION_COOKIE_NAME = {{SESSION_COOKIE_NAME | default('rucio-webui-session')}} | ||
NODE_TLS_REJECT_UNAUTHORIZED = {{NODE_TLS_REJECT_UNAUTHORIZED | default('0')}} | ||
|
||
[gateway] | ||
RUCIO_AUTH_HOST = {{ RUCIO_AUTH_HOST | default('https://rucio-auth-host-not-defined') }} | ||
RUCIO_HOST = {{ RUCIO_HOST | default('https://rucio-host-not-defined') }} | ||
|
||
[oidc] | ||
OIDC_ENABLED = {{ OIDC_ENABLED | default('false') }} | ||
OIDC_PROVIDERS = {{ OIDC_PROVIDERS | default('') }} | ||
|
||
|
||
{% if OIDC_PROVIDERS %} | ||
{% set providers_list = OIDC_PROVIDERS.split(',') %} | ||
{% for provider in providers_list %} | ||
{% set provider_var_name = 'OIDC_PROVIDER_' + provider + '_CLIENT_ID' %} | ||
{% set provider_value = '' %} | ||
{% if provider_var_name in context %} | ||
{% set provider_value = context[provider_var_name] %} | ||
{% endif %} | ||
OIDC_PROVIDER_{{ provider }}_CLIENT_ID={{ provider_value }} | ||
{% endfor %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,25 @@ | ||
#!/bin/bash -e | ||
|
||
j2 /tmp/httpd.conf.j2 | sed '/^\s*$/d' > /etc/httpd/conf/httpd.conf | ||
|
||
echo "=================== /etc/httpd/conf/httpd.conf ========================" | ||
cat /etc/httpd/conf/httpd.conf | ||
echo "" | ||
|
||
|
||
j2 /tmp/rucio.conf.j2 | sed '/^\s*$/d' > /etc/httpd/conf.d/rucio.conf | ||
|
||
echo "=================== /etc/httpd/conf.d/rucio.conf ========================" | ||
cat /etc/httpd/conf.d/rucio.conf | ||
echo "" | ||
|
||
j2 /tmp/.env.default.j2 | sed '/^\s*$/d' > /opt/rucio/webui/.env.default | ||
|
||
if [ -f /opt/rucio/webui/.env ]; then | ||
echo "/opt/rucio/webui/.env already mounted." | ||
else | ||
echo "/opt/rucio/webui/.env not found. will generate one." | ||
python3 /opt/rucio/merge_rucio_configs.py \ | ||
-s /opt/rucio/webui/.env.default $RUCIO_OVERRIDE_CONFIGS \ | ||
--use-env \ | ||
-d /opt/rucio/webui/.env | ||
echo "/opt/rucio/webui/.env not found. will generate one." | ||
j2 /tmp/.env.default.j2 | sed '/^\s*$/d' > /opt/rucio/webui/.env | ||
fi | ||
|
||
echo "=================== /opt/rucio/webui/.env ========================" | ||
cat /opt/rucio/webui/.env | ||
echo "" | ||
|
||
npm run build | ||
cp -rfn /opt/rucio/webui/build/* /var/www/html/ | ||
exec httpd -D FOREGROUND | ||
if [ -d "/patch" ] | ||
then | ||
echo "Patches found. Trying to apply them" | ||
for patchfile in /patch/* | ||
do | ||
echo "Apply patch ${patchfile}" | ||
patch -p3 -d "$RUCIO_WEBUI_PATH" < $patchfile | ||
done | ||
fi | ||
|
||
echo "=================== Starting RUCIO WEBUI ========================" | ||
npm run start |