Commit 824da8dd by Johannes Zellner

Move root folder to /app/data/surfer_root to not clash with the config file

1 parent f43b3c16
Showing with 20 additions and 1 deletions
...@@ -4,6 +4,25 @@ set -eu ...@@ -4,6 +4,25 @@ set -eu
export NODE_ENV=production export NODE_ENV=production
if [[ ! -d "/app/data/surfer_root" ]]; then
echo "=> Migrating root folder from /app/data to /app/data/surfer_root"
mkdir -p /app/data/surfer_root
for file in `find /app/data -maxdepth 1 -mindepth 1 -type f -printf "%f\n"`; do
echo " => Moving /app/data/${file}"
mv "/app/data/${file}" /app/data/surfer_root
done
for dir in `find /app/data -maxdepth 1 -mindepth 1 -type d -printf "%f\n"`; do
if [[ "$dir" != "surfer_root" ]]; then
echo " => Moving /app/data/${dir}"
mv "/app/data/${dir}" /app/data/surfer_root
fi
done
fi
echo "=> Ensure permissions"
chown -R cloudron:cloudron /app/data chown -R cloudron:cloudron /app/data
exec /usr/local/bin/gosu cloudron:cloudron node /app/code/server.js /app/data echo "=> Start the server"
exec /usr/local/bin/gosu cloudron:cloudron node /app/code/server.js /app/data/surfer_root /app/data/.surfer.json
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!