Docker
This commit is contained in:
parent
250e85732d
commit
d3c1c7380f
8
Dockerfile
Normal file
8
Dockerfile
Normal 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"]
|
4
main.go
4
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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user