mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
updated dockerfile and git workflow
This commit is contained in:
@@ -1,37 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
# replace absolute api url to relative
|
||||
jspath=`ls /app/dist/js/app.*.js`
|
||||
sed -i "s?/http:\/\/localhost:8000/\/api/?g" ${jspath}
|
||||
|
||||
# replace default api path to new one
|
||||
if [ "${CRAWLAB_API_ADDRESS}" = "" ];
|
||||
then
|
||||
:
|
||||
else
|
||||
jspath=`ls /app/dist/js/app.*.js`
|
||||
sed -i "s?###CRAWLAB_API_ADDRESS###?${CRAWLAB_API_ADDRESS}?g" ${jspath}
|
||||
fi
|
||||
# if [ "${CRAWLAB_API_ADDRESS}" = "" ];
|
||||
# then
|
||||
# :
|
||||
# else
|
||||
# jspath=`ls /app/dist/js/app.*.js`
|
||||
# sed -i "s?###CRAWLAB_API_ADDRESS###?${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
|
||||
# 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
|
||||
service nginx start
|
||||
|
||||
#grant script
|
||||
chmod +x /app/backend/scripts/*.sh
|
||||
# chmod +x /app/backend/scripts/*.sh
|
||||
|
||||
# install languages
|
||||
if [ "${CRAWLAB_SERVER_LANG_NODE}" = "Y" ] || [ "${CRAWLAB_SERVER_LANG_JAVA}" = "Y" ] || [ "${CRAWLAB_SERVER_LANG_DOTNET}" = "Y" ] || [ "${CRAWLAB_SERVER_LANG_PHP}" = "Y" ] || [ "${CRAWLAB_SERVER_LANG_GO}" = "Y" ];
|
||||
then
|
||||
echo "installing languages"
|
||||
echo "you can view log at /var/log/install.sh.log"
|
||||
/bin/sh /app/backend/scripts/install.sh >> /var/log/install.sh.log 2>&1 &
|
||||
fi
|
||||
# if [ "${CRAWLAB_SERVER_LANG_NODE}" = "Y" ] || [ "${CRAWLAB_SERVER_LANG_JAVA}" = "Y" ] || [ "${CRAWLAB_SERVER_LANG_DOTNET}" = "Y" ] || [ "${CRAWLAB_SERVER_LANG_PHP}" = "Y" ] || [ "${CRAWLAB_SERVER_LANG_GO}" = "Y" ];
|
||||
# then
|
||||
# echo "installing languages"
|
||||
# echo "you can view log at /var/log/install.sh.log"
|
||||
# /bin/sh /app/backend/scripts/install.sh >> /var/log/install.sh.log 2>&1 &
|
||||
# fi
|
||||
|
||||
# generate ssh
|
||||
ssh-keygen -q -t rsa -N "" -f ${HOME}/.ssh/id_rsa
|
||||
|
||||
Reference in New Issue
Block a user