mirror of
https://github.com/mgerb/ServerStatus
synced 2026-01-09 02:52:47 +00:00
added docker support
This commit is contained in:
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/vendor
|
||||||
|
/dist
|
||||||
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
FROM golang:1.11.1-alpine
|
||||||
|
|
||||||
|
WORKDIR /go/src/github.com/mgerb/ServerStatus
|
||||||
|
ADD . .
|
||||||
|
RUN apk add --no-cache git alpine-sdk
|
||||||
|
RUN go get -u github.com/golang/dep/cmd/dep
|
||||||
|
RUN dep ensure
|
||||||
|
RUN make linux
|
||||||
|
|
||||||
|
|
||||||
|
FROM alpine:3.8
|
||||||
|
|
||||||
|
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
|
||||||
|
WORKDIR /server-status
|
||||||
|
COPY --from=0 /go/src/github.com/mgerb/ServerStatus/dist/ServerStatus-linux .
|
||||||
|
ENTRYPOINT ./ServerStatus-linux
|
||||||
|
|
||||||
5
docker-build.sh
Executable file
5
docker-build.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
version=$(git describe --tags)
|
||||||
|
|
||||||
|
docker build -t mgerb/server-status:latest .
|
||||||
|
docker tag mgerb/server-status:latest mgerb/server-status:$version
|
||||||
|
|
||||||
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
version: "2"
|
||||||
|
|
||||||
|
services:
|
||||||
|
server-status:
|
||||||
|
image: mgerb/server-status:latest
|
||||||
|
volumes:
|
||||||
|
- ./config.json:/server-status/config.json
|
||||||
5
docker-push.sh
Executable file
5
docker-push.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
version=$(git describe --tags)
|
||||||
|
|
||||||
|
docker push mgerb/server-status:latest;
|
||||||
|
docker push mgerb/server-status:$version;
|
||||||
|
|
||||||
20
readme.md
20
readme.md
@@ -5,7 +5,7 @@ This bot will send a chat notification when the status of a server changes (goes
|
|||||||
I originally made this bot to check if private World of Warcraft servers were up or not.
|
I originally made this bot to check if private World of Warcraft servers were up or not.
|
||||||
It's actually much more useful than that and can be used for most servers.
|
It's actually much more useful than that and can be used for most servers.
|
||||||
|
|
||||||
NOTE: This bot currently does not work for UDP servers.
|
NOTE: This bot currently does not have any UDP support.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
- Download the latest release [here](https://github.com/mgerb/ServerStatus/releases)
|
- Download the latest release [here](https://github.com/mgerb/ServerStatus/releases)
|
||||||
@@ -25,6 +25,24 @@ it happens to be spamming notifications.
|
|||||||
- time in seconds
|
- time in seconds
|
||||||
- configurable in `config.json`
|
- configurable in `config.json`
|
||||||
|
|
||||||
|
## With Docker
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -it -v /path/to/your/config.json:/server-status/config.json:ro mgerb/server-status
|
||||||
|
```
|
||||||
|
|
||||||
|
### Docker Compose
|
||||||
|
|
||||||
|
```
|
||||||
|
version: "2"
|
||||||
|
|
||||||
|
services:
|
||||||
|
server-status:
|
||||||
|
image: mgerb/server-status:latest
|
||||||
|
volumes:
|
||||||
|
- /path/to/your/config.json:/server-status/config.json
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
To get the current status of your servers simply type `!ServerStatus` in chat.
|
To get the current status of your servers simply type `!ServerStatus` in chat.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user