mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-07 08:34:15 +01:00
Add Dockerfile
This commit is contained in:
parent
88c35e30b4
commit
fb93c33966
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@ -0,0 +1,2 @@
|
||||
examples
|
||||
.github
|
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
# Build the go application into a binary
|
||||
FROM golang:alpine as builder
|
||||
WORKDIR /app
|
||||
ADD . ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -mod vendor -a -installsuffix cgo -o gatus .
|
||||
RUN apk --update add ca-certificates
|
||||
|
||||
# Run the binary on an empty container
|
||||
FROM scratch
|
||||
COPY --from=builder /app/gatus .
|
||||
COPY --from=builder /app/config.yaml .
|
||||
COPY --from=builder /app/static static/
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
ENV PORT 80
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["/gatus"]
|
24
README.md
24
README.md
@ -1,11 +1,7 @@
|
||||
# gatus (in progress)
|
||||
|
||||
A service health dashboard in Go
|
||||
|
||||
|
||||
## Draft
|
||||
|
||||
![draft](assets/draft.jpg)
|
||||
A service health dashboard in Go that is meant to be used as a docker
|
||||
image with a custom configuration file.
|
||||
|
||||
|
||||
## Usage
|
||||
@ -14,8 +10,8 @@ A service health dashboard in Go
|
||||
services:
|
||||
- name: twinnation # Name of your service, can be anything
|
||||
url: https://twinnation.org/actuator/health
|
||||
interval: 15s # Duration to wait between every status check (opt. default: 10s)
|
||||
failure-threshold: 3
|
||||
interval: 15s # Duration to wait between every status check (opt. default: 10s)
|
||||
failure-threshold: 3
|
||||
conditions:
|
||||
- "$STATUS == 200"
|
||||
- name: github
|
||||
@ -30,3 +26,15 @@ services:
|
||||
```
|
||||
go test ./... -mod vendor
|
||||
```
|
||||
|
||||
|
||||
## Building with Docker
|
||||
|
||||
```
|
||||
docker build . -t gatus
|
||||
```
|
||||
|
||||
|
||||
## Using in Production
|
||||
|
||||
See the [example](example) folder.
|
||||
|
BIN
assets/draft.jpg
BIN
assets/draft.jpg
Binary file not shown.
Before Width: | Height: | Size: 190 KiB |
@ -23,10 +23,10 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
const OK = "<span class=\"badge badge-success\">✓</span> ";
|
||||
const NOK = "<span class=\"badge badge-danger\">X</span> ";
|
||||
|
Loading…
Reference in New Issue
Block a user