aboutsummaryrefslogtreecommitdiffhomepage
path: root/start.sh
blob: d29c4ea13196c9c0e3da36e6eaa3f9eb8e811abc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

set -eu

export NODE_ENV=production
export TOKENSTORE_FILE=/app/data/tokens.json

[[ -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