Deploying Rust nightly in Flask
To package our nightly
database Rust package so that it can be deployed, we have to add another clone of our GitHub repository to our build Bash script, install nightly
, and switch to it when we are installing our database package with pip
. You can probably guess what we are going to achieve by cloning our database GitHub repository in our Bash script.
For reference, our src/build_image.sh
file will take the form of the following code:
. . . git clone https://github.com/maxwellflitton/ flitton-fib-rs.git git clone https://github.com/maxwellflitton/ rust-db-cloning.git rm -rf ./flitton-fib-rs/.git rm -rf ./rust-db-cloning/.git docker build . --no-cache -t flask-fib rm -rf ./flitton-fib-rs rm -rf ./rust-db-cloning
Here, we can see that we have merely added the code for cloning the rust-db-cloning
repository, removed the .git
file in that rust-db-cloning
repository, and then removed the rust-db-cloning
repository once the image build has finished...