Browse Source

Docker: Fix container configuration

The replacement patterns have been broken by the new Webpack setup.
Danilo Bargen 6 năm trước cách đây
mục cha
commit
c437481e5a
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      docker/entrypoint.sh

+ 3 - 3
docker/entrypoint.sh

@@ -5,10 +5,10 @@ set -euo pipefail
 echo "Patching config file..."
 cd /usr/share/nginx/html/
 if [ ! -z "$SALTYRTC_HOST" ]; then
-    sed -i "s/SALTYRTC_HOST: null,/SALTYRTC_HOST: '${SALTYRTC_HOST}',/g" dist/app.js
+    sed -i -E "s/SALTYRTC_HOST:\s*null,/SALTYRTC_HOST:'${SALTYRTC_HOST}',/g" *.bundle.js
 fi
-sed -i "s/SALTYRTC_PORT: [^,]*,/SALTYRTC_PORT: ${SALTYRTC_PORT},/g" dist/app.js
-sed -i "s/SALTYRTC_SERVER_KEY: '[^']*',/SALTYRTC_SERVER_KEY: '${SALTYRTC_SERVER_KEY}',/g" dist/app.js
+sed -i -E "s/SALTYRTC_PORT:\s*[^,]*,/SALTYRTC_PORT:${SALTYRTC_PORT},/g" *.bundle.js
+sed -i -E "s/SALTYRTC_SERVER_KEY:\s*\"[^\"]*\",/SALTYRTC_SERVER_KEY:\"${SALTYRTC_SERVER_KEY}\",/g" *.bundle.js
 
 echo "Starting Threema Web..."
 exec nginx -g 'daemon off;'