From b02d8855989c87f7cddb5bf78207bd168931a8d9 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 27 May 2025 08:09:21 +0800 Subject: [PATCH 1/2] Modified README to specify downloading the Node.js version instead of Linux version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 97fb2d3..6c1a155 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ wget https://raw.githubusercontent.com/BenjaminPrice/fvtt-docker/master/docker-c ### Step 2 - Download the Foundry VTT Zip File - Navigate to your User Profile page and find your Software Download Links on your license page. -- Download the `Linux` version. +- Download the `Node.js` version. - Save it to the same directory as the `docker-compose.yaml` file from the previous step. ### Step 3 - Create your data directory From a7569835444e1ef84e90bda04bd2cb2253b0f21e Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 27 May 2025 19:59:09 +0800 Subject: [PATCH 2/2] Added step to delete everything in resources/app to ensure that the directory is empty before moving the new files --- run-server.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/run-server.sh b/run-server.sh index 2f70e0d..f907458 100644 --- a/run-server.sh +++ b/run-server.sh @@ -1,7 +1,6 @@ #!/bin/sh -# look for a file name foundryvtt-.....zip or FoundryVTT...zip, copy it to -# /opt/foundryvtt, unzip and remove it. Then start the foundry app +set -e # Exit immediately on error cd /opt/foundryvtt || exit echo "Copying zip file..." @@ -10,9 +9,12 @@ find /host -type f -name '[f,F]oundry[vtt,VTT]*.zip' -exec cp '{}' . ';' echo "Unzipping..." unzip -o ./*.zip -d unpacked && rm ./*.zip -echo "Moving to mapped directory" +echo "Cleaning target app folder..." +rm -rf resources/app/* + +echo "Moving to mapped directory..." mv unpacked/* resources/app/ -echo "Starting node" +echo "Starting node..." cd resources/app -node main.mjs --dataPath=/data/foundryvtt \ No newline at end of file +exec node main.mjs --dataPath=/data/foundryvtt \ No newline at end of file