mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
updated docker init
This commit is contained in:
@@ -1,28 +1,23 @@
|
|||||||
# replace base url
|
# replace env
|
||||||
if [ "${CRAWLAB_BASE_URL}" = "" ];
|
indexpath=/app/dist/index.html
|
||||||
then
|
if test -z "$CRAWLAB_BASE_URL"; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
indexpath=/app/dist/index.html
|
sed -i "s?/js/?${CRAWLAB_BASE_URL}/js/?g" ${indexpath}
|
||||||
if test -z "$CRAWLAB_BASE_URL"; then
|
sed -i "s?/css/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath}
|
||||||
:
|
sed -i "s/ <link rel=\"icon\" type=\"image\/x-icon\" href=\"/ <link rel=\"icon\" type=\"image\/x-icon\" href=\"\/${CRAWLAB_BASE_URL}/g" ${indexpath}
|
||||||
else
|
sed -i "s/ <link rel=\"stylesheet\" href=\"/ <link rel=\"stylesheet\" href=\"${CRAWLAB_BASE_URL}\//g" ${indexpath}
|
||||||
sed -i "s?/js/?${CRAWLAB_BASE_URL}/js/?g" ${indexpath}
|
sed -i "s/ window.VUE_APP_API_BASE_URL = '/ window.VUE_APP_API_BASE_URL = '\/${CRAWLAB_BASE_URL}/g" ${indexpath}
|
||||||
sed -i "s?/css/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath}
|
fi
|
||||||
sed -i "s/ <link rel=\"icon\" type=\"image\/x-icon\" href=\"/ <link rel=\"icon\" type=\"image\/x-icon\" href=\"\/${CRAWLAB_BASE_URL}/g" ${indexpath}
|
if test -z "$CRAWLAB_INIT_BAIDU_TONGJI"; then
|
||||||
sed -i "s/ <link rel=\"stylesheet\" href=\"/ <link rel=\"stylesheet\" href=\"${CRAWLAB_BASE_URL}\//g" ${indexpath}
|
:
|
||||||
sed -i "s/ window.VUE_APP_API_BASE_URL = '/ window.VUE_APP_API_BASE_URL = '\/${CRAWLAB_BASE_URL}/g" ${indexpath}
|
else
|
||||||
fi
|
sed -i "s/ window.VUE_APP_INIT_BAIDU_TONGJI =/ window.VUE_APP_INIT_BAIDU_TONGJI = '${CRAWLAB_INIT_BAIDU_TONGJI}'/g" ${indexpath}
|
||||||
if test -z "$CRAWLAB_INIT_BAIDU_TONGJI"; then
|
fi
|
||||||
:
|
if test -z "$CRAWLAB_INIT_UMENG"; then
|
||||||
else
|
:
|
||||||
sed -i "s/ window.VUE_APP_INIT_BAIDU_TONGJI =/ window.VUE_APP_INIT_BAIDU_TONGJI = '${CRAWLAB_INIT_BAIDU_TONGJI}'/g" ${indexpath}
|
else
|
||||||
fi
|
sed -i "s/ window.VUE_APP_INIT_UMENG =/ window.VUE_APP_INIT_UMENG = '${CRAWLAB_INIT_UMENG}'/g" ${indexpath}
|
||||||
if test -z "$CRAWLAB_INIT_UMENG"; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
sed -i "s/ window.VUE_APP_INIT_UMENG =/ window.VUE_APP_INIT_UMENG = '${CRAWLAB_INIT_UMENG}'/g" ${indexpath}
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# start nginx
|
# start nginx
|
||||||
|
|||||||
Reference in New Issue
Block a user