1 Star 0 Fork 180

一介农夫/jetlinks-ui-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-entrypoint.sh 918 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
API_BASE_PATH=$API_BASE_PATH;
SERVER_NAME=$SERVER_NAME;
NAMESERVERS=$(cat /etc/resolv.conf | grep "nameserver" | awk '{print $2}' | tr '\n' ' ')
if [ -z "$API_BASE_PATH" ]; then
API_BASE_PATH="http://jetlinks:8844/";
fi
apiUrl="proxy_pass $API_BASE_PATH\$1;"
resolver="resolver $NAMESERVERS ipv6=off;"
sed -i '11c '"$resolver"'' /etc/nginx/conf.d/default.conf
sed -i "s%{API_BASE_PATH}%$API_BASE_PATH%g" /etc/nginx/conf.d/default.conf
if [ -z "$SERVER_NAME" ]; then
serverName="server_name localhost;"
sed -i '4c '"$serverName"'' /etc/nginx/conf.d/default.conf
sed -i "s%{SERVER_NAME}%\"0\"%g" /etc/nginx/conf.d/default.conf
else
serverName="server_name $SERVER_NAME;"
sed -i '4c '"$serverName"'' /etc/nginx/conf.d/default.conf
sed -i "s%{SERVER_NAME}%$SERVER_NAME%g" /etc/nginx/conf.d/default.conf
fi
#cat /etc/nginx/conf.d/default.conf
nginx -g "daemon off;"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bambuo/jetlinks-ui-vue.git
git@gitee.com:bambuo/jetlinks-ui-vue.git
bambuo
jetlinks-ui-vue
jetlinks-ui-vue
master

搜索帮助