diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0bfba28 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM golang:1.22 +WORKDIR /app +COPY go.mod go.sum ./ +RUN go mod download +COPY * ./ +RUN CGO_ENABLED=0 GOOS=linux go build -o /snow +EXPOSE 3000 +CMD ["/snow"] diff --git a/main.go b/main.go index 870f51b..0b17df4 100644 --- a/main.go +++ b/main.go @@ -1,8 +1,8 @@ package main import ( - _ "embed" "fmt" + "os" "github.com/ectrc/snow/aid" "github.com/ectrc/snow/discord" @@ -17,10 +17,10 @@ import ( "github.com/gofiber/fiber/v2" ) -//go:embed config.ini var configFile []byte func init() { + configFile, _ = os.ReadFile("config.ini"); aid.LoadConfig(configFile) var device storage.Storage switch aid.Config.Database.Type {