entrypoint.sh 371 B

12345678910111213141516
  1. #!/bin/sh
  2. dataDir=${DATADIR:-/app/data}
  3. echo "dataDir: $dataDir"
  4. if [ -f "$dataDir/nginx.conf" ];then
  5. if [ -f /etc/nginx/nginx.conf ]; then
  6. mv -f /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
  7. fi
  8. ln -s $dataDir/nginx.conf /etc/nginx/nginx.conf
  9. fi
  10. #nginx -g "daemon on;"
  11. ## 启用 nginx-ui的服务
  12. nohup /app/app & > /app/logs.log
  13. nginx -g "daemon off;"