-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (62 loc) · 2.28 KB
/
Makefile
File metadata and controls
88 lines (62 loc) · 2.28 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
.PHONY: help build up down restart logs shell clean
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Available targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
build: ## Build all containers
docker-compose build
up: ## Start all services
docker-compose up -d
down: ## Stop all services
docker-compose down
restart: ## Restart all services
docker-compose restart
logs: ## View logs for all services
docker-compose logs -f
shell-workspace: ## Access workspace shell
docker-compose exec workspace bash
shell-python: ## Access Python container shell
docker-compose exec python bash
shell-django: ## Access Django container shell
docker-compose exec django bash
shell-flask: ## Access Flask container shell
docker-compose exec flask bash
shell-fastapi: ## Access FastAPI container shell
docker-compose exec fastapi bash
clean: ## Remove all containers and volumes
docker-compose down -v
docker system prune -f
ps: ## Show running containers
docker-compose ps
# Django commands
django-migrate: ## Run Django migrations
docker-compose exec django python manage.py migrate
django-makemigrations: ## Create Django migrations
docker-compose exec django python manage.py makemigrations
django-createsuperuser: ## Create Django superuser
docker-compose exec django python manage.py createsuperuser
django-shell: ## Access Django shell
docker-compose exec django python manage.py shell
# Database commands
postgres-psql: ## Access PostgreSQL shell
docker-compose exec postgres psql -U default -d default
mysql-shell: ## Access MySQL shell
docker-compose exec mysql mysql -u default -p default
mongodb-shell: ## Access MongoDB shell
docker-compose exec mongodb mongosh -u default -p secret
redis-cli: ## Access Redis CLI
docker-compose exec redis redis-cli
# Development
jupyter: ## Start Jupyter Notebook
docker-compose up -d jupyter
@echo "Jupyter available at http://localhost:8888"
test: ## Run tests
docker-compose exec workspace pytest
lint: ## Run linters
docker-compose exec workspace flake8 .
docker-compose exec workspace black --check .
docker-compose exec workspace isort --check .
format: ## Format code
docker-compose exec workspace black .
docker-compose exec workspace isort .