-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.windows
More file actions
66 lines (56 loc) · 2.09 KB
/
Copy pathMakefile.windows
File metadata and controls
66 lines (56 loc) · 2.09 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
AUTH_BINARY=authApp
FRONT_END_BINARY=frontApp
BROKER_BINARY=brokerApp
LOGGER_BINARY=loggerServiceApp
## up: starts all containers in the background without forcing build
up:
@echo Starting Docker images...
docker-compose up -d
@echo Docker images started!
## up_build: stops docker compose (if running), builds all projects and starts docker compose
up_build: build_broker build_auth build_logger
@echo Stopping docker images if running...
docker-compose down
@echo Building when required and starting docker images...
docker-compose up --build -d
@echo Docker images built and started!
## down: stop docker compose
down:
@echo Stopping docker compose...
docker-compose down
@echo Done!
## build_broker: builds the broker binary as a linux executable
build_broker:
@echo Building broker binary...
cd .\broker-service && SET GOOS=linux&& SET GOARCH=amd64&& SET CGO_ENABLED=0&& go build -o $(BROKER_BINARY) .\cmd\api
@echo Done!
## build_logger: builds the logger binary as a linux executable
build_logger:
@echo Building logger binary...
cd .\logger-service && SET GOOS=linux&& SET GOARCH=amd64&& SET CGO_ENABLED=0&& go build -o $(LOGGER_BINARY) .\cmd\api
@echo Done!
## build_auth: builds the auth binary as a linux executable
build_auth:
@echo Building auth binary...
cd .\authentication-service && SET GOOS=linux&& SET GOARCH=amd64&& SET CGO_ENABLED=0&& go build -o $(AUTH_BINARY) .\cmd\api
@echo Done!
## build_front: builds the front end binary
build_front:
@echo Building front end binary...
cd .\front-end && SET CGO_ENABLED=0&& SET GOOS=linux&& go build -o $(FRONT_END_BINARY) .\cmd\web
@echo Done!
## start: starts the front end
start: build_front
@echo Starting front end...
cd .\front-end && go build -o $(FRONT_END_BINARY) .\cmd\web
cd .\front-end && start .\$(FRONT_END_BINARY)
## stop: stop the front end
stop:
@echo Stopping front end...
@taskkill /IM $(FRONT_END_BINARY).exe /F
@echo Stopped front end!
## clean: remove generated binaries
clean:
@echo Cleaning binaries...
del /F /Q $(FRONT_END_BINARY).exe $(BROKER_BINARY).exe $(LOGGER_BINARY).exe $(AUTH_BINARY).exe
@echo Done!