forked from jsreport/jsreport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
29 lines (21 loc) · 778 Bytes
/
run.sh
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
# file run.sh
#!/bin/sh
if [ -d "/jsreport" ]; then
# link data folder from mounted volume
if [ ! -d "/jsreport/data" ]; then
mkdir "/jsreport/data"
fi
ln -nsf "/jsreport/data" "/app/data"
# copy default config
if [ ! -f "/jsreport/jsreport.config.json" ]; then
cp "/app/jsreport.config.json" "/jsreport/jsreport.config.json"
fi
ln -s "/jsreport/prod.config.json" "/app/prod.config.json"
ln -s "/jsreport/dev.config.json" "/app/dev.config.json"
ln -s "/jsreport/license-key.txt" "/app/license-key.txt"
ln -s "/jsreport/jsreport.license.json" "/app/jsreport.license.json"
rm -f "/app/jsreport.config.json"
ln -s "/jsreport/jsreport.config.json" "/app/jsreport.config.json"
chown -R jsreport:jsreport /jsreport
fi
node "/app/server.js"