-
Notifications
You must be signed in to change notification settings - Fork 6
Improve Docker setup + make commands
#768
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
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #768 +/- ##
=======================================
Coverage 88.04% 88.04%
=======================================
Files 153 153
Lines 6224 6224
=======================================
Hits 5480 5480
Misses 744 744
🚀 New features to boost your workflow:
|
b19f6af to
d29af79
Compare
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 works as intended when i run it locally, and the documentation in the readme is easy to understand. I also like using custom make commands (especially since we are make), as it makes the commands smaller and easier to remember
6f726ed to
75702d9
Compare
Added:
* sync
* manage
* makemessages
* makemessages-all
* compilemessages
* collectstatic
* update
Renamed:
* migrations -> makemigrations
* Both to try and distinguish it more from `migrate`, and to make it
have the same name as the actual management command, which can be
useful (habit-wise) when running `makemigrations` in other contexts
* superuser -> createsuperuser
* For the same, latter reason as above
* run -> start
* "Run" was a bit ambiguous in that it could sound like you wanted to
run some arbitrary command (like `uv run`).
Also, if going by the same reasoning as the two points above,
`runserver` would have been a bit long for such a frequently used
command.
Also removed `startapp`, as it's used so incredibly rarely that it's not
very useful having it as its own `make` command.
Also made `shell` use `shell_plus`, which is usually more useful.
The name of the Docker Compose file now matches more closely with the ones in the Docker docs, e.g. `compose.yaml` in https://docs.docker.com/compose/gettingstarted/#step-2-define-services-in-a-compose-file and `compose.<something>.yaml` in https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/ Chose a `.dev` suffix for it, to make it clearer that it's only used for development stuff (not production).
* Environment variables specific to Docker can now be provided using a `.env.docker` file * The image is now based on the latest stable Ubuntu release, like the prod server * Static and media files are persisted between runs (through a volume) * Started using a cache mount for uv, to improve performance across builds * Added Docker-specific `make` commands, all prefixed with `d-` * Stopped always running migrations when starting the container; it's more useful having manual control, using e.g. `make d-migrate`
d29af79 to
34298b3
Compare
This depends on #767.
Proposed changes
.env.dockerfilemakecommands, all prefixed withd-make d-migratemakecommands (0f5f1f2)Also moved and renamed the Docker-related files (7141f4d).
Review guidance
Test it out locally and post any feedback here 🙂
Checklist
(If any of the points are not relevant, mark them as checked, so that it's easy to see which points you've handled or not)
makemigrations,makemessagesandcompilemessages