-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
41 lines (28 loc) · 1.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.DEFAULT_GOAL := help
include Makefiles/*.mk
# Generates a help message. Borrowed from https://github.com/pydanny/cookiecutter-djangopackage.
help: ## Display this help message
@echo "Please use \`make <target>' where <target> is one of the following:"
@perl -nle'print $& if m{^[\.a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
# Tasks to be run in developer shell
## Python requirements
compile-requirements: ## Compile Python requirements without upgrading
docker-compose run --rm app make pip-compile
upgrade-requirements: ## Compile and upgrade Python requirements
docker-compose run --rm app make pip-compile-upgrade
## Docker
dev-build: ## Build development images
docker-compose build --pull
dev-up: ## Start development environment
docker-compose up -d
dev-down: ## Destroy development environment
docker-compose down
dev-ps: ## View development environment containers
docker-compose ps
dev-restart: dev-down dev-up dev-ps ## Restart development environment
dev-shell: ## Start a shell running in the app container
docker-compose run --rm app /bin/bash
dev-migrate: ## Migrate the development database
docker-compose run --rm app ./manage.py migrate
# TODO
# dev-setup: dev-docker-pull dev-db-restore dev-sync-media