1.1 KiB
1.1 KiB
System deployment
Prerequisites
Client
Database
Backend / Flask app
In order to not have complicated and error-prone copying manoevers a direct deployment from the repo is used using git.
File structure
Steps
- Created a ssh-key for the user that does the installation on the server following the Github instructions.
- Deploy generated key to the Github user account.
- In the shell, activate ssh-agent and add the key. For example:
eval ($ssh-agent)
ssh-add ~/.ssh/od_ed25519
- Change to deployment folder
cd /var/www/brecal_test
- Perform sparse checkout on the Flask server subtree
git clone -n git@github.com:puls200/brecal.git <target_folder>
cd <target_folder>
git sparse-checkout set --no-cone src/server
git checkout
- Database credentials are stored outside the web root, we are using /var/www/secure. Here the file
connection_data.jsonis placed, a different named copy for each instance.