entrypoint.sh
| 1 | #!/bin/sh |
| 2 | # Publish the bundled index.html into the (typically bind-mounted) /static |
| 3 | # directory so the host's web server can pick it up, then start the |
| 4 | # signaling server. Always overwrites so a rebuilt image updates the file. |
| 5 | set -e |
| 6 | if [ -d /static ] && [ -w /static ]; then |
| 7 | cp -f /opt/static/index.html /static/index.html |
| 8 | fi |
| 9 | exec /usr/local/bin/signal "${PORT:-8080}" |
| 10 |