-
Notifications
You must be signed in to change notification settings - Fork 60
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
Better docker development tools #551
Conversation
- allow for UID/GID of user to be determined at image build time - allow passing in --reload and change log level for gunicorn - provide a new pretalx command `devel` that is used for starting in reloading mode
Reviewer's Guide by SourceryThis pull request improves the docker development experience by allowing the user and group IDs to be configured, adding a Makefile target to build the local docker image, allowing pretix to be run in development mode with hot reloading, and making the gunicorn log level configurable. Sequence diagram for pretix in development modesequenceDiagram
participant User
participant Docker Container
participant Supervisord
participant Gunicorn
User->>Docker Container: Runs 'docker compose up'
Docker Container->>Docker Container: Executes 'pretix devel'
Docker Container->>Docker Container: Runs 'make production'
Docker Container->>Docker Container: Sets GUNICORN_LOGLEVEL to debug
Docker Container->>Docker Container: Sets GUNICORN_RELOAD to true
Docker Container->>Supervisord: Starts Supervisord with config
Supervisord->>Gunicorn: Starts Gunicorn with --reload and --log-level=debug
Gunicorn->>Gunicorn: Hot reloading on source file changes
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @norbusan - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a
make help
target to explain the available make commands. - The
TODO
comment in the Dockerfile should be addressed before merging.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Summary by Sourcery
Configure UID/GID in the Dockerfile, add a Makefile for local Docker image builds, and allow pretalx to take a 'devel' argument for hot reloading gunicorn and setting debug log level.
Build:
Deployment:
devel
command to the pretix.bash script to enable hot reloading of gunicorn and set the log level to debug during development within the Docker container.