entrypoint.sh 471 B

1234567891011121314
  1. #!/bin/sh
  2. set -euo pipefail
  3. # Patch config file
  4. echo "Patching config file..."
  5. cd /usr/share/nginx/html/
  6. if [ ! -z "$SALTYRTC_HOST" ]; then
  7. sed -i "s/SALTYRTC_HOST: null,/SALTYRTC_HOST: '${SALTYRTC_HOST}',/g" dist/app.js
  8. fi
  9. sed -i "s/SALTYRTC_PORT: [^,]*,/SALTYRTC_PORT: ${SALTYRTC_PORT},/g" dist/app.js
  10. sed -i "s/SALTYRTC_SERVER_KEY: '[^']*',/SALTYRTC_SERVER_KEY: '${SALTYRTC_SERVER_KEY}',/g" dist/app.js
  11. echo "Starting Threema Web..."
  12. exec nginx -g 'daemon off;'