-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (28 loc) · 1.29 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
# ----------------------------------------------------------------------------
# Self-Documented Makefile
# ref: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
# ----------------------------------------------------------------------------
.PHONY: help
.DEFAULT_GOAL := help
help: ## ⁉️ - Display help comments for each make command
@grep -E '^[0-9a-zA-Z_-]+:.*? .*$$' \
$(MAKEFILE_LIST) \
| awk 'BEGIN { FS=":.*?## " }; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' \
| sort
setup: build ## 🔨 - Set instance up
docker-compose run climtech_web django-admin migrate
docker-compose run climtech_web django-admin createcachetable
build: ## 🔨 - Build Docker container
bash -c "docker-compose build --build-arg UID=$$(id -u) --build-arg GID=$$(id -g)"
start: ## 🎬 - Start containers
docker-compose up
sh: ## Enter the climtech_web container
docker-compose exec climtech_web bash
runserver: ## 🏃 - Run Django server
docker-compose exec climtech_web django-admin runserver 0.0.0.0:8000
superuser: ## 🔒 - Create superuser
docker-compose run climtech_web django-admin createsuperuser
migrations: ## 🧳 - Make migrations
docker-compose run climtech_web django-admin makemigrations
migrate: ## 🧳 - Migrate
docker-compose run climtech_web django-admin migrate