Skip to content

Conversation

@rebkwok
Copy link
Contributor

@rebkwok rebkwok commented Nov 4, 2025

Fixes #19

Updates to the Dockerfile to follow the repo-template version.

Avoid needing to copy uv into the prod image by running the prod entrypoint
with just python, not uv run. We're running in the venv created with
uv, using the python version we installed with deadsnakes, so just
python should do the right thing.

Use --frozen rather than --locked to use the uv.lock file as it is.

Also run the tests in the dev entrypoint without uv; dependencies
are installed inthe docker image and we don't need/want it to
re-sync every time
# See https://github.com/opensafely-core/repo-template/blob/main/DEVELOPERS.md for details
[tool.uv]
exclude-newer = "2025-10-27T00:00:00Z"
required-version = ">=0.9"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah! I needed this yesterday in the ehrQL repo!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I only added it in this repo because the UV version was specified in places, but maybe it should be in the repo-template too

DEVELOPERS.md Outdated
```bash
# build the image
docker build . -t tpp-database-utils
just build-docker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be

just docker/build

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah this is done in a later commit!

@rebkwok rebkwok merged commit e4a87dc into main Nov 7, 2025
2 checks passed
@rebkwok rebkwok deleted the uv branch November 7, 2025 08:31
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.

Update to latest repo-template and uv

3 participants