Open Mapiarz opened 9 hours ago
Thanks for the issue. I think I wouldn't expect this to work either locally or in CI, because we won't re-build / re-install your project after the static files are generated. By default, we only re-build / re-install local projects if the pyproject.toml
, setup.py
, or setup.cfg
files change -- it's similar to https://docs.astral.sh/uv/concepts/cache/#dynamic-metadata, but this is about extra content and not dynamic metadata per se.
I think you probably want --reinstall-package {project_name}
in the second command.
Hi. I have a django app and I cannot build a docker image with django's staticfiles artifact.
Here's my dockerfile (this is just the first stage of my image, in the second stage I copy the environment)
This is a pretty simple set up. Copy the app source code, run
uv sync
to install all the dependencies. Once that's done, I can start up my django app and collect the static files. The files are placed in the source folder. Then, I runuv sync
again so that the staticfiles are copied to virtual environment. The problem is they are not.Here's also the relevant part in pyproject.toml
I'm completely lost on what's going on for 2 primary reasons:
RUN rm -rf .venv
to my dockerfile before the second invocation ofuv sync
and the static files will be then collected correctly.Please advise.