mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-31 18:10:50 +01:00
添加各个节点的镜像制作
This commit is contained in:
23
examples/frontend/docker_init.sh
Executable file
23
examples/frontend/docker_init.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
# replace default api path to new one
|
||||
if [ "${CRAWLAB_API_ADDRESS}" = "" ];
|
||||
then
|
||||
:
|
||||
else
|
||||
jspath=`ls /app/dist/js/app.*.js`
|
||||
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}/js/?g" ${indexpath}
|
||||
sed -i "s?/css/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath}
|
||||
fi
|
||||
|
||||
# start nginx
|
||||
nginx -g 'daemon off;'
|
||||
Reference in New Issue
Block a user