diff --git a/Dockerfile b/Dockerfile index d6846d9..3414d8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM interlegis/alpine-postfix +LABEL maintainer="Danya Sliusar " + ADD ./bin/sendmail-http / ADD start.sh / diff --git a/Makefile b/Makefile index 97ea265..ba39711 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,13 @@ +APP_NAME=sendmail-http + + +all: build + build: - env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/sendmail-http + env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ + go build -o ./bin/$(APP_NAME) clean: - rm ./bin/sendmail-http + rm ./bin/$(APP_NAME) docker: - docker build -t danyanya/postfix-http . \ No newline at end of file + docker build -t danyanya/$(APP_NAME) . \ No newline at end of file diff --git a/README.md b/README.md index 3e77b1e..a3915e9 100644 --- a/README.md +++ b/README.md @@ -1 +1,20 @@ -Simple http to sendmail +# sendmail http + +Simple http server for sendmail (based on postfix alpine) + +## Build + +Binary can be built by execute: + +``` +make build + +``` + +To make docker image exec: + +``` + +make docker + +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a943375 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3.6' +services: + postfix-http: + image: danyanya/postfix-http + entrypoint: /start.sh + environment: + - SERVER_ADDR=:1001 \ No newline at end of file