diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2020-12-30 21:16:50 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2020-12-30 21:16:50 -0600 |
| commit | 8f1068ac3135bcccf09374bc787ef22049b43461 (patch) | |
| tree | 5d80a254f5ee7b7c6b3956f6a7307591bc5a93e2 /bin | |
| parent | ec4a85e4e8b64a0ae91c494e3c8ef520f0a8b8c3 (diff) | |
| download | slskd-8f1068ac3135bcccf09374bc787ef22049b43461.tar.gz | |
copy files from example
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/build | 26 | ||||
| -rw-r--r-- | bin/publish | 10 | ||||
| -rw-r--r-- | bin/run | 14 | ||||
| -rw-r--r-- | bin/start | 16 |
4 files changed, 66 insertions, 0 deletions
diff --git a/bin/build b/bin/build new file mode 100644 index 00000000..8b3470ad --- /dev/null +++ b/bin/build @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +# build web +cd web +pwd +npm install +npm run build + +# remove old build, but keep .gitkeep +rm -rf ../api/wwwroot +mkdir ../api/wwwroot +touch ../api/wwwroot/.gitkeep + +# copy new files +cp -r build/* ../api/wwwroot/ + +# publish api + web +cd ../api +pwd +dotnet publish --configuration Release + +# build docker +cd .. +pwd +docker build -t jpdillingham/slsk-web-example:latest .
\ No newline at end of file diff --git a/bin/publish b/bin/publish new file mode 100644 index 00000000..c2e2faf6 --- /dev/null +++ b/bin/publish @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +cd api +pwd + +dotnet publish --configuration Release --self-contained --runtime win-x64 +dotnet publish --configuration Release --self-contained --runtime linux-x64 +dotnet publish --configuration Release --self-contained --runtime linux-arm +dotnet publish --configuration Release --self-contained --runtime osx-x64
\ No newline at end of file diff --git a/bin/run b/bin/run new file mode 100644 index 00000000..24d81890 --- /dev/null +++ b/bin/run @@ -0,0 +1,14 @@ +docker run -i \ + -p 5000:5000 \ + -p 50000:50000 \ + -v $SLSK_OUTPUT_DIR:/var/slsk/download \ + -v $SLSK_SHARED_DIR:/var/slsk/shared \ + -e "SLSK_USERNAME=$SLSK_USERNAME" \ + -e "SLSK_PASSWORD=$SLSK_PASSWORD" \ + -e "SLSK_LISTEN_PORT=50000" \ + -e "SLSK_ENABLE_DNET=true" \ + -e "SLSK_DNET_CHILD_LIMIT=10" \ + -e "SLSK_DIAGNOSTIC=Info" \ + -e "SLSK_CONNECT_TIMEOUT=5000" \ + -e "SLSK_INACTIVITY_TIMEOUT=15000" \ + jpdillingham/slsk-web-example:latest
\ No newline at end of file diff --git a/bin/start b/bin/start new file mode 100644 index 00000000..949fa365 --- /dev/null +++ b/bin/start @@ -0,0 +1,16 @@ +docker run -d \ + -p 5000:5000 \ + -p 50000:50000 \ + -v $SLSK_OUTPUT_DIR:/var/slsk/download \ + -v $SLSK_SHARED_DIR:/var/slsk/shared \ + -e "SLSK_USERNAME=$SLSK_USERNAME" \ + -e "SLSK_PASSWORD=$SLSK_PASSWORD" \ + -e "SLSK_LISTEN_PORT=50000" \ + -e "SLSK_ENABLE_DNET=true" \ + -e "SLSK_DNET_CHILD_LIMIT=10" \ + -e "SLSK_DIAGNOSTIC=Info" \ + -e "SLSK_CONNECT_TIMEOUT=5000" \ + -e "SLSK_INACTIVITY_TIMEOUT=15000" \ + --name soulseek \ + --restart always \ + jpdillingham/slsk-web-example:latest
\ No newline at end of file |
