Adding a dockerfile to application
This commit is contained in:
parent
6d6b9a567f
commit
b90e61cf66
13
application/Dockerfile
Normal file
13
application/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM golang:1.21
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download && go mod verify
|
||||
COPY main.go main.go
|
||||
RUN go build -v -o /usr/local/bin/app ./main.go
|
||||
|
||||
ENV PORT_LISTENING=8080
|
||||
ENV JSON_LOCATION=https://git.altarik.fr/Altarik/launcher_json/raw/branch/master/launcher.json
|
||||
EXPOSE 8080
|
||||
CMD ["app"]
|
@ -14,7 +14,7 @@ import (
|
||||
func main() {
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
log.Fatal("Error loading .env file")
|
||||
log.Println("Error loading .env file -- ignore if production")
|
||||
}
|
||||
r := gin.Default()
|
||||
r.GET("/", getLauncherJson)
|
||||
|
Loading…
Reference in New Issue
Block a user