Getting started
Setting up
- Setup python env
- Install python 3.9.X
pip install pipenv
pipenv install --dev
- Run local db
- Install Docker Desktop with WSL2
- Run db
.\scripts\run_db.ps1
- (Optional) Run local db admin
- Run db admin
.\scripts\run_db_admin.ps1
- Open db admin
- Add secrets
- Copy and rename
.\scripts\env_secrets_example.ps1
to env_secrets.ps1
- Get values from André and set them in the file
- Run
.\scripts\run_web.ps1
- (Verify) Open page
- (Verify) Open api
- (Verify) Run tests
pytest .
- Take note tests may randomly fail, probably because of the local datastore returning stale values in integration tests, or because of a bug in the db context yielding
- (Optional) Setup pre-commit:
cp pre-commit.sh .git/hooks/pre-commit
Import prod data to local db
- Run
.\scripts\populate.ps1
Verifying user
For a user to be able to make changes to the data it needs to be verified
- Have the user log in and select a name
- Go to the database admin, find the User and set activated to true
Deploy to production
- Install gcloud cli, and authenticate yourself
- Run
.\scripts\deploy.ps1
Implementation
Backup
- Cloud Scheduler
- Pushes a message to a Pub/Sub topic
- Which trigger a Cloud Function
Relevant links