-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstart.sh.internal
More file actions
39 lines (28 loc) · 851 Bytes
/
start.sh.internal
File metadata and controls
39 lines (28 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
set -e
if [ -e /bundle/bundle.tar.gz ]; then
echo "Found /bundle/bundle.tar.gz"
cd /bundle
chmod -v 777 bundle.tar.gz || true
echo "=> Extracting bundle"
TAR_OPTIONS=$([ $EUID == 0 ] && echo "" || echo "--no-same-owner")
NPM_OPTIONS=$([ $EUID == 0 ] && echo " --unsafe-perm" || echo "")
tar $TAR_OPTIONS -xzf bundle.tar.gz
cd /bundle/bundle
echo "=> Setting node version"
. /home/app/scripts/setup_nvm.sh
echo "=> Installing npm dependencies"
cd ./programs/server && npm install $NPM_OPTIONS $NPM_INSTALL_OPTIONS
cd ../..
else
cd /built_app
echo "=> Setting node version"
. /home/app/scripts/setup_nvm.sh
fi
if [ -e /settings.json ]; then
METEOR_SETTINGS=$(cat /settings.json)
echo "=> set meteor settings"
fi
export PORT=${PORT:-3000}
echo "=> Starting meteor app on port $PORT"
node main.js