commit
6b3cdd4bc2
@ -11,4 +11,14 @@ else
|
||||
fi
|
||||
|
||||
envsubst '${API_URL} ${API_OFFICE_URL}' < /var/www/public/config.js.template > /var/www/public/config.js
|
||||
|
||||
# 循环检查,直到 jmalcloud 主机名可以被成功解析
|
||||
# 使用 getent hosts 是比 ping 更可靠的方式,因为它直接查询名称服务
|
||||
while ! getent hosts jmalcloud > /dev/null 2>&1; do
|
||||
echo "jmalcloud is not yet resolvable, waiting 2 seconds..."
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "jmalcloud is now resolvable. Starting Nginx..."
|
||||
|
||||
exec "$@"
|
||||
|
||||
@ -16,8 +16,6 @@ http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
resolver 127.0.0.11 valid=30s ipv6=off;
|
||||
|
||||
# 日志
|
||||
#access_log /var/log/nginx/access.log main buffer=32k flush=5s;
|
||||
access_log off;
|
||||
|
||||
@ -16,8 +16,6 @@ http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
resolver 127.0.0.11 valid=30s ipv6=off;
|
||||
|
||||
# 日志
|
||||
#access_log /var/log/nginx/access.log main buffer=32k flush=5s;
|
||||
access_log off;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user