This repository has been archived by the owner on Sep 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (48 loc) · 2.02 KB
/
Makefile
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: all help build logs loc up stop down
# make all - Default Target. Does nothing.
all:
@echo "Project helper commands."
@echo "For more information try 'make help'."
# target: help - Display callable targets.
help:
@egrep "^# target:" [Mm]akefile
help_win:
Select-String "^# target:" Makefile
# target: env = generate env files
env:
cp ./client/etc/env.dist ./client/.env
cp ./controller/etc/env.dist ./controller/.env
cp ./gophish/etc/env.dist ./gophish/.env
# target: build = build all containers
build:
docker-compose -f ./client/local-docker-compose.yml build
docker-compose -f ./client/ReportService/docker-compose.yml build
docker-compose -f ./gophish/docker-compose.yml build
docker-compose -f ./controller/docker-compose.yml build
docker-compose -f ./aws/docker-compose.yml build
# target: up - Run GoPhish.
up:
docker-compose -f ./client/local-docker-compose.yml up -d
docker-compose -f ./controller/docker-compose.yml up -d
docker-compose -f ./gophish/docker-compose.yml up -d
docker-compose -f ./aws/docker-compose.yml up -d
# target: local - Run all containers required for a local environment
local:
docker-compose -f ./client/local-docker-compose.yml up -d
docker-compose -f ./client/ReportService/docker-compose.yml up -d
docker-compose -f ./controller/docker-compose.yml up -d
docker-compose -f ./gophish/docker-compose.yml up -d
# target: stop - Stop all docker containers
stop:
docker-compose -f ./client/local-docker-compose.yml stop
docker-compose -f ./client/ReportService/docker-compose.yml stop
docker-compose -f ./gophish/docker-compose.yml stop
docker-compose -f ./controller/docker-compose.yml stop
docker-compose -f ./aws/docker-compose.yml stop
# target: down - Remove all docker containers
down:
docker-compose -f ./client/local-docker-compose.yml down && \
docker-compose -f ./client/ReportService/docker-compose.yml down || \
docker-compose -f ./gophish/docker-compose.yml down || \
docker-compose -f ./controller/docker-compose.yml down || \
docker-compose -f ./aws/docker-compose.yml down