-
Notifications
You must be signed in to change notification settings - Fork 263
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
Docker development environment improvements #180
Conversation
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.
Love this overall. I would like to see the tasks that have flags be documented using the help
argument to the @task()
decorator and remove the extra context
and flag documentation from the docstrings.
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.
🚢 🇮🇹
@task( | ||
help={ | ||
"force_rm": "Always remove intermediate containers", | ||
"cache": "Whether to use Docker's cache when building the image (defaults to enabled)", |
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.
Ooh fancy.
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.
% invoke build --help
Usage: inv[oke] [--core-opts] build [--options] [other tasks here ...]
Docstring:
Build Nautobot docker image.
Options:
-c, --[no-]cache Whether to use Docker's cache when building the image (defaults to enabled)
-f, --force-rm Always remove intermediate containers
🤵
Fixes: #163 (in a roundabout way)
docker-entrypoint.sh
(which is extraneous at best, and downright confusing when runninginvoke createsuperuser
)--python-ver
argument from all invoke tasks and document in the developer guide thatexport PYTHON_VER=3.x
is the way to set a non-default Python version for the Docker Compose workflow.docker_compose()
helper function intasks.py
and use it to cut down boilerplate.--nocache
and--forcerm
options to thebuild
task.invoke restart
task.coverage-run
andcoverage-report
tasks tounittest
andunittest-coverage
respectively.--keepdb
option to theunittest
taskdocker-entrypoint.sh
when running unit tests and linters (saving container startup time).