-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (40 loc) · 1.17 KB
/
Makefile
File metadata and controls
49 lines (40 loc) · 1.17 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
NO_COLOR=\x1b[0m
OK_COLOR=\x1b[32;01m
ERROR_COLOR=\x1b[31;01m
WARN_COLOR=\x1b[33;01m
OK_STRING=$(OK_COLOR)[OK]$(NO_COLOR)
ERROR_STRING=$(ERROR_COLOR)[ERRORS]$(NO_COLOR)
WARN_STRING=$(WARN_COLOR)[WARNINGS]$(NO_COLOR)
default: install
install:
@echo "Installing dependencies..."
go mod download && go mod verify
@echo "Dependencies installed $(OK_STRING)"
install-example: install
@echo "Copying example environment variables..."
cp .env.example .env
@echo "Copied environment variables $(OK_STRING)"
run-db:
@echo "Starting database..."
docker compose up -d
@echo "Database running $(OK_STRING)"
run-api:
@echo "Starting API..."
go run main.go
@echo "API running $(OK_STRING)"
build-docker:
@echo "Building in docker..."
docker build -t support-graphql .
@echo "Application has been built in docker $(OK_STRING)"
run-docker:
@echo "Starting in docker..."
docker compose up -d
@echo "Application running in docker $(OK_STRING)"
stop-docker:
@echo "Stopping in docker..."
docker compose down
@echo "Application stopping in docker $(OK_STRING)"
run-example: build-docker
@echo "Starting in docker..."
docker compose up -d
@echo "Application running in docker $(OK_STRING)"