X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git;a=blobdiff_plain;f=start.sh;h=d29c4ea13196c9c0e3da36e6eaa3f9eb8e811abc;hp=9967ed8980c211d12e2e5fccc3d7e79c47bc339e;hb=HEAD;hpb=e16480a383e38dc72ab747ef8bf8b6f02de63f44 diff --git a/start.sh b/start.sh index 9967ed8..d29c4ea 100755 --- a/start.sh +++ b/start.sh @@ -3,6 +3,13 @@ set -eu export NODE_ENV=production +export TOKENSTORE_FILE=/app/data/tokens.json -cd /app/code -app.js /app/data +[[ -d /app/data/surfer_root ]] && mv /app/data/surfer_root /app/data/public +mkdir -p /app/data/public + +echo "=> Ensure permissions" +chown -R cloudron:cloudron /app/data + +echo "=> Start the server" +exec /usr/local/bin/gosu cloudron:cloudron node /app/code/server.js /app/data/public /app/data/.surfer.json