From 711e4942ad0e707a845897d1f4a28503530af278 Mon Sep 17 00:00:00 2001 From: Aaron Fischer Date: Thu, 18 Mar 2021 23:35:08 +0100 Subject: [PATCH] Add dockerfile --- Dockerfile | 14 ++++++++++++++ cmd/buchdesmonats/main.go | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..282c6b6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:alpine AS build +COPY . /app +WORKDIR /app +RUN GOOS=linux go build -o bdm cmd/buchdesmonats/main.go + + +FROM alpine +WORKDIR /app +COPY ./static /app/static/ +COPY ./templates /app/templates/ +RUN mkdir /app/covers/ +COPY --from=build /app/bdm /app/bdm +EXPOSE 9783 +CMD ["./bdm"] diff --git a/cmd/buchdesmonats/main.go b/cmd/buchdesmonats/main.go index f3c0eb9..5e3c2f7 100644 --- a/cmd/buchdesmonats/main.go +++ b/cmd/buchdesmonats/main.go @@ -129,7 +129,7 @@ func main() { getHTML("COMIC.mkd", w) }) - err := http.ListenAndServe(":1337", nil) + err := http.ListenAndServe(":9783", nil) if err != nil { panic(err) }