-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Makefile for use with docker #1879
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
up: | ||
@docker-compose -f local.yml up | ||
|
||
build: | ||
@docker-compose -f local.yml up --force-recreate --build | ||
|
||
manage: | ||
@docker-compose -f local.yml run --rm django python ./manage.py $(filter-out $@,$(MAKECMDGOALS)) --settings=config.settings.local | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I use a
and later on:
this way its idempotent. It doesnt matter if you are already on |
||
|
||
# https://stackoverflow.com/a/6273809/1826109 | ||
%: | ||
@: | ||
|
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.
I find a bit confusing that
make build
actually does adocker-compose up ...
. One might want to re-build and then run a manage command rather than starting the whole stack.What's the reason for that? I'd rather keep them a bit more separate and only do
docker-compose build
.We can chain commands easily with make:
make build up
,Finally, could we accept an optional parameter to rebuild only one container, e.g.
django
?