Add minimal Dockerfile and docker-compose

This commit is contained in:
Aaron Fischer 2021-11-16 23:49:28 +01:00
parent dd60967565
commit b4837655f9
No known key found for this signature in database
GPG key ID: CB8E2DBACD93CE77
2 changed files with 21 additions and 0 deletions

11
Dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM golang:alpine AS build
COPY . /app
WORKDIR /app
RUN GOOS=linux go build -o matrix-alertmanager-receiver
FROM alpine
WORKDIR /app
COPY ./config.toml.sample /etc/matrix-alertmanager-receiver.toml
COPY --from=build /app/matrix-alertmanager-receiver /app/matrix-alertmanager-receiver
EXPOSE 9088
CMD ["./matrix-alertmanager-receiver"]

10
docker-compose.yml Normal file
View file

@ -0,0 +1,10 @@
version: "3.3"
services:
matrix-receiver:
build: .
image: matrix-alertmanager-receiver:latest
restart: always
volumes:
- ./config.toml:/etc/matrix-alertmanager-receiver.toml
ports:
- 9088:9088