forked from jinfeijie/yapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·30 lines (29 loc) · 901 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·30 lines (29 loc) · 901 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
#! /bin/sh
cd ${VENDORS}
if [ ! -e "init.lock" ]
then
cd ${VENDORS}
sed -i "s/DIY-PORT/"${PORT}"/g" ${VENDORS}/config.json
sed -i "s/DIY-AC/"${ADMIN_EMAIL}"/g" ${VENDORS}/config.json
sed -i "s/DIY-DB-SERVER/"${DB_SERVER}"/g" ${VENDORS}/config.json
sed -i "s/DIY-DB-NAME/"${DB_NAME}"/g" ${VENDORS}/config.json
sed -i "s/DIY-DB-PORT/"${DB_PORT}"/g" ${VENDORS}/config.json
cp ${VENDORS}/config.json ${HOME}
cp ${VENDORS}/config.json ${HOME}/../
# sed -i "s/DIY-PORT/3000/g" config.json
# sed -i "s/DIY-AC/me@jinfeijie.cn/g" ${VENDORS}/config.json
# sed -i "s/DIY-DB-SERVER/mongo/g" ${VENDORS}/config.json
# sed -i "s/DIY-DB-NAME/yapi/g" ${VENDORS}/config.json
# sed -i "s/DIY-DB-PORT/27017/g" ${VENDORS}/config.json
# yapi install -v 1.5.6
yapi install -v ${VERSION}
touch init.lock
fi
cd ${VENDORS}
# 先判断有没有CMD指定路径
if [ $1 ]
then
node $i
else
node server/app.js
fi