-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·86 lines (66 loc) · 1.75 KB
/
Makefile
File metadata and controls
executable file
·86 lines (66 loc) · 1.75 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
.PHONY: help install test lint format clean build start stop restart logs
# Help target
help:
@echo "Available commands:"
@echo " make install Install all dependencies"
@echo " make dev Start development environment"
@echo " make build Build all services"
@echo " make start Start all services"
@echo " make stop Stop all services"
@echo " make restart Restart all services"
@echo " make logs Show logs"
@echo " make test Run tests"
@echo " make lint Run linters"
@echo " make format Format code"
@echo " make clean Clean up"
# Install dependencies
install:
@echo "Installing dependencies..."
cd api && npm install
cd frontend && npm install
cd email-bridge && pip install -r requirements.txt
# Development
up:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d
dev: up
# Build
build:
docker-compose build
# Start/Stop/Restart
start:
docker-compose up -d
stop:
docker-compose down
restart: stop start
# Logs
logs:
docker-compose logs -f
# Testing
test:
cd api && npm test
cd frontend && npm test
# Linting
lint:
cd api && npm run lint
cd frontend && npm run lint
# Formatting
format:
cd api && npm run format
cd frontend && npm run format
# Cleanup
clean:
docker-compose down -v
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
find . -name "dist" -type d -prune -exec rm -rf '{}' +
find . -name "build" -type d -prune -exec rm -rf '{}' +
find . -name "coverage" -type d -prune -exec rm -rf '{}' +
# Build and push git changes
push:
./scripts/build.sh
git add .
git commit -m "[auto] Update at $(date '+%Y-%m-%d %H:%M:%S')"
git push
# Publish to Docker registry
publish:
docker-compose build
docker-compose push