Skip to content
Merged
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
28 changes: 14 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,23 +186,23 @@ services:
networks:
- warehouse-backend

#https://github.com/EOSC-Data-Commons/eoscdcpoc/pkgs/container/eoscdcpoc-frontend
#https://github.com/EOSC-Data-Commons/matchmaker/pkgs/container/matchmaker-frontend
frontend:
image: ghcr.io/eosc-data-commons/eoscdcpoc-frontend:latest
image: ghcr.io/eosc-data-commons/matchmaker-frontend:latest
# Removes only targeted frontend artifacts before refreshing them from /webapp.
command: >
sh -c 'set -eu
echo "Existing volume contents BEFORE prune (/frontend-volume)";
if [ -d /frontend-volume ]; then find /frontend-volume -maxdepth 2 -type f -print || true; else echo "(volume empty or not yet created)"; fi;
echo "Pruning old frontend artifacts (assets/, *.html, *.svg, *.css, *.js)";
rm -rf /frontend-volume/assets || true;
find /frontend-volume -maxdepth 1 -type f \( -name "*.html" -o -name "*.svg" -o -name "*.css" -o -name "*.js" \) -exec rm -f {} + || true;
echo "Copying updated assets directory";
if [ -d /webapp/assets ]; then cp -a /webapp/assets /frontend-volume/; fi;
echo "Copying root-level *.html / *.svg / *.css / *.js";
find /webapp -maxdepth 1 -type f \( -name "*.html" -o -name "*.svg" -o -name "*.css" -o -name "*.js" \) -exec cp -f {} /frontend-volume/ \+;
echo "Final volume contents AFTER copy";
find /frontend-volume -maxdepth 2 -type f -print'
sh -c 'set -eu
echo "Existing volume contents BEFORE prune (/frontend-volume)";
if [ -d /frontend-volume ]; then find /frontend-volume -maxdepth 2 -type f -print || true; else echo "(volume empty or not yet created)"; fi;
echo "Pruning old frontend artifacts (assets/, *.html, *.svg, *.css, *.js)";
rm -rf /frontend-volume/assets || true;
find /frontend-volume -maxdepth 1 -type f \( -name "*.html" -o -name "*.svg" -o -name "*.css" -o -name "*.js" \) -exec rm -f {} + || true;
echo "Copying updated assets directory";
if [ -d /webapp/assets ]; then cp -a /webapp/assets /frontend-volume/; fi;
echo "Copying root-level *.html / *.svg / *.css / *.js";
find /webapp -maxdepth 1 -type f \( -name "*.html" -o -name "*.svg" -o -name "*.css" -o -name "*.js" \) -exec cp -f {} /frontend-volume/ \+;
echo "Final volume contents AFTER copy";
find /frontend-volume -maxdepth 2 -type f -print'
volumes:
- frontend-data:/frontend-volume

Expand Down