updated Jenkinsfile

This commit is contained in:
Marvin Zhang
2019-08-07 12:53:08 +08:00
parent d5bb59c1b6
commit 12fc5cf74c
3 changed files with 12 additions and 1 deletions

View File

@@ -6,10 +6,19 @@ then
:
else
jspath=`ls /app/dist/js/app.*.js`
cp ${jspath} ${jspath}.bak
sed -i "s?localhost:8000?${CRAWLAB_API_ADDRESS}?g" ${jspath}
fi
# replace base url
if [ "${CRAWLAB_BASE_URL}" = "" ];
then
:
else
indexpath=/app/dist/index.html
sed -i "s?/js/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath}
sed -i "s?/css/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath}
fi
# start nginx
service nginx start

View File

@@ -4,6 +4,7 @@ services:
image: "tikazyq/crawlab:develop"
environment:
CRAWLAB_API_ADDRESS: "crawlab.cn/dev/api"
CRAWLAB_BASE_URL: "/dev"
CRAWLAB_SERVER_MASTER: "Y"
CRAWLAB_MONGO_HOST: "mongo"
CRAWLAB_REDIS_ADDRESS: "redis"

View File

@@ -4,6 +4,7 @@ services:
image: "tikazyq/crawlab:master"
environment:
CRAWLAB_API_ADDRESS: "crawlab.cn/api"
CRAWLAB_BASE_URL: "/demo"
CRAWLAB_SERVER_MASTER: "Y"
CRAWLAB_MONGO_HOST: "mongo"
CRAWLAB_REDIS_ADDRESS: "redis"