MusicPlayer/build_docker.sh

18 lines
588 B
Bash
Raw Normal View History

2022-03-24 15:10:59 +00:00
#!/bin/bash
echo Generate flutter release
2022-03-24 15:30:04 +00:00
flutter build web --dart-define API_URL="<<<API_URL>>>" --dart-define API_TOKEN="<<<API_TOKEN>>>" --source-maps
2022-03-24 15:10:59 +00:00
echo Build associated server
cd player-server && cargo build --release && cd ..
rm -rf image
mkdir image
cp -r build/web image
cp player-server/target/release/player-server image
2022-03-24 15:23:41 +00:00
echo Patch built files
sed -i 's/<\/head>/<script>window.flutterConfiguration = {canvasKitBaseUrl: "\/canvaskit\/"}<\/script><\/head>/g' image/web/index.html
2022-03-24 15:10:59 +00:00
echo Build Docker image
docker build image -f Dockerfile -t pierre42100/new_web_music_player