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

Replaces J2 with env-generator #274

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions webui/Dockerfile
Expand Up @@ -29,14 +29,19 @@ WORKDIR /opt/rucio/webui

ENV RUCIO_WEBUI_PATH=$(WORKDIR)

RUN curl https://raw.githubusercontent.com/rucio/rucio/master/tools/merge_rucio_configs.py --output /opt/rucio/merge_rucio_configs.py
RUN git clone --depth 1 -b ${TAG} -- https://github.com/rucio/webui.git /opt/rucio/webui

WORKDIR /opt/rucio/webui/tools/env-generator/
RUN npm install
RUN npm install liquidjs
RUN npm run build
RUN chmod +x ./dist/generate-env.js

WORKDIR /opt/rucio/webui/
RUN npm install
RUN npm run build

COPY docker-entrypoint.sh /
COPY .env.default.j2 /tmp/

EXPOSE 443
EXPOSE 80
Expand Down
2 changes: 1 addition & 1 deletion webui/docker-entrypoint.sh
Expand Up @@ -4,7 +4,7 @@ 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."
j2 /tmp/.env.default.j2 | sed '/^\s*$/d' > /opt/rucio/webui/.env
/opt/rucio/webui/tools/env-generator/dist/generate-env.js make prod /opt/rucio/webui/./.env --write
fi

echo "=================== /opt/rucio/webui/.env ========================"
Expand Down