This repository has been archived on 2025-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
BreCal/misc/Deployment.md

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

  1. Created a ssh-key for the user that does the installation on the server following the Github instructions.
  2. Deploy generated key to the Github user account.
  3. In the shell, activate ssh-agent and add the key. For example:
eval ($ssh-agent)
ssh-add ~/.ssh/od_ed25519
  1. Change to deployment folder
cd /var/www/brecal_test
  1. 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
  1. Database credentials are stored outside the web root, we are using /var/www/secure. Here the file connection_data.json is placed, a different named copy for each instance.