docker_start.sh 490 Bytes
Newer Older
priit's avatar
priit committed
1 2
#!/bin/bash

priit's avatar
priit committed
3 4 5
git pull
npm install

priit's avatar
priit committed
6
if [ ! -f /config/config.js ]; then
nostneji's avatar
nostneji committed
7
    cp -R -u -p ./config_dist.js /config/config.js
priit's avatar
priit committed
8
fi
priit's avatar
priit committed
9 10

if [ -f /config/config.js ]; then
nostneji's avatar
nostneji committed
11
    cp /config/config.js ./config.js
priit's avatar
priit committed
12 13
fi

nostneji's avatar
nostneji committed
14 15
if [ ! -f ./config.js ]; then
    cp -R -u -p ./config_dist.js ./config.js
priit's avatar
priit committed
16 17
fi

18 19 20 21 22
if [ -f /wrapper/logs/forever.log ]; then
    mv /wrapper/logs/forever.log /wrapper/logs/forever.log.prev
fi

forever start -l /wrapper/logs/forever.log ./app.js
priit's avatar
priit committed
23
forever list
priit's avatar
priit committed
24

nostneji's avatar
nostneji committed
25
tail -f /wrapper/logs/forever.log