-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6a0456
commit 6ab4636
Showing
8 changed files
with
144 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
# Binaries for programs and plugins | ||
.env | ||
*.dll | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
.env | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
*.so | ||
*.test | ||
build/ | ||
output/ | ||
binary/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
IMAGE_NAME = $(shell basename $(shell pwd)) | ||
TAG_LATEST = $(IMAGE_NAME):latest | ||
TAG_DATE = $(IMAGE_NAME):$(shell date +"%Y-%m-%dT%H_%M") | ||
|
||
.PHONY: all image binary clean | ||
|
||
all: image build | ||
|
||
image: | ||
docker build . \ | ||
-t $(TAG_LATEST) \ | ||
-t $(TAG_DATE) | ||
|
||
build: | ||
mkdir -p binary | ||
go build -a \ | ||
-gcflags=all="-l -B" \ | ||
-ldflags="-w -s" \ | ||
-o binary/$(IMAGE_NAME) \ | ||
./... | ||
|
||
clean: | ||
rm -rf binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,5 @@ services: | |
container_name: redis | ||
networks: | ||
- default | ||
ports: | ||
- 6379:6379 | ||
expose: | ||
- 6379 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ smtpConfig: | |
password: "example" | ||
from: "me@example.com" | ||
targetEmail: | ||
- "you@yourself.com" | ||
- "you@yourself.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,54 @@ | ||
<!-- | ||
Customize this template | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<body> | ||
<head> | ||
<link rel="stylesheet" href="styles/dracula-ui.css" /> | ||
<style> | ||
/* Add your custom styles here */ | ||
.content { | ||
max-width: 800px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
} | ||
|
||
.summary-table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
margin-top: 1rem; | ||
} | ||
|
||
.summary-table th, | ||
.summary-table td { | ||
border: 1px solid; | ||
padding: 0.5rem; | ||
text-align: left; | ||
} | ||
|
||
.summary-table th { | ||
font-weight: bold; | ||
} | ||
</style> | ||
<div> | ||
<h1> | ||
</head> | ||
<body class="drac-bg-black"> | ||
<div class="content drac-text-white"> | ||
{{ if .Assets.Banner }} | ||
<img src="{{ .Assets.Banner }}" alt="Banner" style="max-width: 100%; height: auto;"/> | ||
{{ end }} | ||
<h1 class="drac-text-red"> | ||
Alert {{ .Labels.Severity }} | ||
</h1> | ||
<div> | ||
<h2>Summary:</h2> | ||
<table class="summary-table drac-text"> | ||
<tbody> | ||
{{ range $key, $value := .CommonAnnotations }} | ||
<tr> | ||
<td>{{ $key }}:</td> | ||
<td>{{ $value }}</td> | ||
</tr> | ||
{{ end }} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> | ||
</html> |