-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (45 loc) · 1.51 KB
/
Makefile
File metadata and controls
57 lines (45 loc) · 1.51 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
.PHONY: help install dev build start stop clean test lint scenario-build
help:
@echo "DevOps Learning Platform - Available commands:"
@echo " make install - Install dependencies"
@echo " make dev - Start development environment"
@echo " make build - Build production images"
@echo " make start - Start production environment"
@echo " make stop - Stop all services"
@echo " make clean - Clean up containers and volumes"
@echo " make test - Run tests"
@echo " make lint - Run linting"
@echo " make scenario-build - Build all scenario images"
install:
npm install
cd src/server && npm install
dev:
docker-compose up -d
@echo "Frontend: http://localhost:3000"
@echo "Backend: http://localhost:3001"
build:
docker-compose build
$(MAKE) scenario-build
start:
docker-compose up -d --build
stop:
docker-compose down
clean:
docker-compose down -v
docker rmi $$(docker images -q 'devopslearn/*') 2>/dev/null || true
test:
npm test
cd src/server && npm test
lint:
npm run lint
npm run typecheck
scenario-build:
@echo "Building scenario base image..."
docker build -t devopslearn/scenario-base:latest -f docker/Dockerfile.scenario-base .
@echo "Building Keycloak CrashLoop scenario..."
docker build -t devopslearn/scenario-keycloak-crashloop:latest -f scenarios/kubernetes/keycloak-crashloop/Dockerfile scenarios/kubernetes/keycloak-crashloop/
@echo "Scenario images built successfully!"
logs:
docker-compose logs -f
ps:
docker-compose ps