Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fastapi conversion #818

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Fastapi conversion #818

wants to merge 12 commits into from

Conversation

paulespinosa
Copy link
Member

@paulespinosa paulespinosa commented Oct 7, 2024

Related #789

What changes did you make?

  • Started with clean Alembic migration environment and added migration script to insert roles into the database.
  • Create backend startup scripts to pre-populate the database and moto server with test user accounts.
  • Updated backend Dockerfile
  • Run the API using a script instead of directly in order to ensure test user accounts are populated before starting the API.
  • Updated docker-compose
    • Added moto server as a container
    • Added pgAdmin4 as a container

Rationale behind the changes?

Testing done for these changes

  • Run docker compose on development machine and manually checked that all services are integrated.
HUU-docker-environment HUU-pgadmin4 HUU-motoserver

This commit updates alembic migrations, creates docker compose environment, and
creates test users for local development.
The create_groups_users.py program needed to get the db URL from the environment variable.
The example has keys and values that can be used directly during development.
In this commit, the frontend will still fail to build due to test errors.
However, that is being fixed in parallel and this will ensure that the frontend
will be able to run in a container when it does get fixed.
This commit includes basic documentation about pre-populated test user accounts.
By having the backend depend on pgadmin, the `db` container will transitively be
run too.
Updated the service URLs.
The backend startup scripts that pre-populated moto server was allowing
duplicate data to be added to moto. This happens when moto server is running
while the API is repeatedly started using the `entrypoint` script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant