由于docker的hosts的动态生成机制,hosts直接写入镜像无效,故调整为写在启动脚本中

This commit is contained in:
ngfchl
2022-10-07 19:35:05 +08:00
parent 41ffe6fda5
commit 9b5a7d5aec

View File

@@ -34,5 +34,7 @@ if [ ! -e $CONTAINER_ALREADY_STARTED ]; then
else
echo "-- Not first container startup --"
fi
echo "写入U2 hosts"
echo 172.64.153.252 u2.dmhy.org >>/etc/hosts
echo "启动服务"
python manage.py runserver 0.0.0.0:$DJANGO_WEB_PORT >>/var/www/html/ptools/db/$(date "+%Y%m%d").log 2>&1