Adding dynamic rewrite of nginx during entrypoint to support TARGET_PORT

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2023-01-19 01:04:43 -08:00
parent 1975b174a8
commit 353095c2f8

View File

@ -1,5 +1,9 @@
#!/bin/bash
nginx
if [[ "${TARGET_PORT}" != "" ]]; then
sed -i -e "s,8123,${TARGET_PORT},g" /etc/nginx/sites-enabled/default
fi
/usr/sbin/nginx
mkdir -p /var/lib/shellinabox
chmod a+rwX /var/lib/shellinabox
@ -19,4 +23,4 @@ else
{ while true; do npm start ; sleep 3 ; done ; } &
cd /website/client
npm start
fi
fi