Update docker scripts for testing
This commit is contained in:
parent
cac38d9809
commit
b7b50d1104
4 changed files with 26 additions and 5 deletions
12
backend/build-docker.sh
Normal file → Executable file
12
backend/build-docker.sh
Normal file → Executable file
|
@ -1,5 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo build --release
|
echo "--- Rust version info ---"
|
||||||
|
rustup --version
|
||||||
|
rustc --version
|
||||||
|
cargo --version
|
||||||
|
|
||||||
|
echo "--- Building plugin backend ---"
|
||||||
|
cargo build --release
|
||||||
mkdir -p out
|
mkdir -p out
|
||||||
cp target/release/fantastic-rs out/backend
|
cp target/release/fantastic-rs out/backend
|
||||||
|
|
||||||
|
echo " --- Cleaning up ---"
|
||||||
|
# remove root-owned target folder
|
||||||
|
cargo clean
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cross build --release
|
cargo build --target x86_64-unknown-linux-musl --release
|
||||||
mkdir out
|
mkdir -p ../bin
|
||||||
cp ./target/release/fantastic-rs out/backend
|
cp ./target/x86_64-unknown-linux-musl/release/fantastic-rs ../bin/backend
|
||||||
|
|
4
backend/create_docker_img.sh
Executable file
4
backend/create_docker_img.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# build docker container locally (for testing)
|
||||||
|
|
||||||
|
docker build -t fantastic_backend .
|
7
backend/run_docker_img.sh
Executable file
7
backend/run_docker_img.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# run docker container locally (for testing)
|
||||||
|
# assumes you're running in the backend/ dir of the project
|
||||||
|
|
||||||
|
docker run -i --entrypoint /backend/entrypoint.sh -v $PWD:/backend fantastic_backend
|
||||||
|
mkdir -p ../bin
|
||||||
|
cp ./out/backend ../bin
|
Loading…
Reference in a new issue