Add dockerfile

This commit is contained in:
Aaron Fischer 2021-03-18 23:35:08 +01:00
parent 22d36d5a89
commit 711e4942ad
2 changed files with 15 additions and 1 deletions

14
Dockerfile Normal file
View file

@ -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"]

View file

@ -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)
}