-
Notifications
You must be signed in to change notification settings - Fork 0
Change package manager to uv #38
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
base: main
Are you sure you want to change the base?
Conversation
| 1. Install [uv](https://docs.astral.sh/uv/getting-started/installation/) using the command below, or one of other the methods listed in the `uv` documentation | ||
|
|
||
| ```bash | ||
| brew install uv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we attach the installation to brew knowing that is mac specific? I'm ok but just wanted to bring it to the table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good point. Perhaps we should just offer the link to the uv installation instructions and let the user decide?
This PR updates:
uvRegarding the Dockerfile
It was adapted from the uv docker example repository.
Dev dependencies are only installed when
RUN_ENVis set tolocal, so tests can be run on the application container. I can adapt the testing pipeline so that pytest can hit the test db from the local shell, to 1) simplify how tests are run, 2) make the app image generation faster and the end result lighter. Leave a comment requesting that change if it is desirable.There are other Dockerfile examples, particularly, a multi-stage build that creates a smaller final image. I did not use that as basis, but it can be used if deemed useful. Leave a comment to request that change if it is desirable.
Regarding the docker-compose configuration
Now uses healthchecks to wait until the db container is ready until the api is started. This renders the
api_pre_start.pyscript useless, so I removed it.The watch feature is used to sync local changes to the container, which is a modern alternative to mounting the project directory on the app workdir. The same feature is also used to automatically rebuild and remount the image if changes are made to dependencies or the .env file.