docker-entrypoint.sh 598 B

12345678910111213141516171819
  1. #!/bin/sh
  2. set -e
  3. cp -rv /opt/ui/dist/* /var/www
  4. if [[ ! -z "$BASE_URL_OVERRIDE" ]]; then
  5. echo "running with BASE_URL=${BASE_URL_OVERRIDE}"
  6. sed -i "s^{PLACEHOLDER_BASE_URL}^$BASE_URL_OVERRIDE^g" /var/www/*.js
  7. else
  8. echo "running with BASE_URL=${BASE_URL}"
  9. sed -i "s^{PLACEHOLDER_BASE_URL}^$BASE_URL^g" /var/www/*.js
  10. fi
  11. envsubst '$API_PORT $API_SERVER $UI_PORT' < /etc/nginx/conf.d/default.nginx.conf.template > /etc/nginx/conf.d/default.nginx.conf
  12. echo "Starting ui version $VERSION ($HEAD)"
  13. # Run the parent (nginx) container's entrypoint script
  14. exec /docker-entrypoint.sh "$@"