This commit is contained in:
2vb 2024-05-14 17:20:23 -07:00
parent 250e85732d
commit d3c1c7380f
2 changed files with 10 additions and 2 deletions

8
Dockerfile Normal file
View File

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

View File

@ -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 {