-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (29 loc) · 1.29 KB
/
Makefile
File metadata and controls
42 lines (29 loc) · 1.29 KB
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
42
start: ## Start the Docker containers
@echo "Starting the Docker containers"
@docker-compose up -d
@echo "Containers started - http://localhost:8001"
services: ## Start Docker containers excl. "web"
@docker-compose up db redis celery -d
stop: ## Stop Containers
@docker-compose down
build: ## Build Containers
@docker-compose build
ssh: ## SSH into running web container
docker-compose exec web bash
migrations: ## Create DB migrations in the container
@docker-compose exec web uv run manage.py makemigrations
migrate: ## Run DB migrations in the container
@docker-compose exec web uv run manage.py migrate
shell: ## Get a Django shell
@docker-compose exec web uv run manage.py shell
init: start migrate ## Quickly get up and running (start containers and migrate DB)
npm-install: ## Install npm dependencies (Alpine, HTMX, Bootstrap, Sass, etc.)
@docker-compose exec web npm install
static-build: ## Build static files for production (compile CSS, copy vendor files)
@docker-compose exec web npm run build
static-watch: ## Watch and compile CSS changes for development
@docker-compose exec web npm run dev-watch
.PHONY: help
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'