Add Dockerfile and publish image
Closes: https://todo.xenrox.net/~xenrox/ntfy-alertmanager/4
This commit is contained in:
parent
e12116eae9
commit
5f187d1311
3 changed files with 33 additions and 1 deletions
|
@ -4,6 +4,10 @@
|
|||
|
||||
A bridge between ntfy and Alertmanager.
|
||||
|
||||
## Installation
|
||||
|
||||
Simply use go build or the [docker image] with [docker-compose file].
|
||||
|
||||
## Configuration
|
||||
|
||||
You can specify the configuration file location with the `--config` flag. By default
|
||||
|
@ -20,7 +24,7 @@ Example:
|
|||
|
||||
```
|
||||
# http listen address
|
||||
http-address 127.0.0.1:8080
|
||||
http-address :8080
|
||||
# Log level (either debug, info, warning, error)
|
||||
log-level info
|
||||
# Optionally protect with HTTP basic authentication
|
||||
|
@ -75,3 +79,5 @@ Report bugs on the [issue tracker].
|
|||
[priority]: https://ntfy.sh/docs/publish/#message-priority
|
||||
[tags]: https://ntfy.sh/docs/publish/#tags-emojis
|
||||
[issue tracker]: https://todo.xenrox.net/~xenrox/ntfy-alertmanager
|
||||
[docker image]: https://hub.docker.com/r/xenrox/ntfy-alertmanager
|
||||
[docker-compose file]: https://git.xenrox.net/~xenrox/ntfy-alertmanager/tree/master/item/docker/docker-compose.yml
|
||||
|
|
16
docker/Dockerfile
Normal file
16
docker/Dockerfile
Normal file
|
@ -0,0 +1,16 @@
|
|||
FROM golang:alpine as build
|
||||
WORKDIR /app
|
||||
ARG VERSION=0.1.0
|
||||
|
||||
RUN wget https://git.xenrox.net/~xenrox/ntfy-alertmanager/refs/download/v${VERSION}/ntfy-alertmanager-${VERSION}.tar.gz -O latest.tar.gz && \
|
||||
tar -zxf latest.tar.gz
|
||||
RUN cd ntfy-alertmanager-${VERSION} && \
|
||||
go build -o /app/ntfy-alertmanager
|
||||
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /
|
||||
|
||||
COPY --from=build /app/ntfy-alertmanager /ntfy-alertmanager
|
||||
|
||||
ENTRYPOINT [ "./ntfy-alertmanager" ]
|
10
docker/docker-compose.yml
Normal file
10
docker/docker-compose.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
version: "3"
|
||||
services:
|
||||
ntfy-alertmanager:
|
||||
image: xenrox/ntfy-alertmanager:latest
|
||||
container_name: ntfy-alertmanager
|
||||
volumes:
|
||||
- ./config:/etc/ntfy-alertmanager/config
|
||||
ports:
|
||||
- 127.0.0.1:8080:8080
|
||||
restart: unless-stopped
|
Loading…
Reference in a new issue