diff --git a/Dockerfile b/Dockerfile index 63dd831..f4a4ffc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ COPY mail.go main.go ./ RUN CGO_ENABLED=1 GOOS=linux go build -o ./build --tags "fts5" -a -ldflags '-linkmode external -extldflags "-static"' . -FROM alpine:latest as app +FROM alpine:latest AS app RUN apk --no-cache add bash nginx ca-certificates tzdata diff --git a/go.mod b/go.mod index 48d2b93..e1753f1 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.21.1 require ( github.com/golang-jwt/jwt/v5 v5.2.1 - github.com/joho/godotenv v1.5.1 github.com/likexian/whois v1.15.1 github.com/pquerna/otp v1.4.0 golang.org/x/oauth2 v0.21.0 diff --git a/go.sum b/go.sum index f11be27..2673ed7 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,6 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.12.4 h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg= github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI= -github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= -github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/likexian/gokit v0.25.13 h1:p2Uw3+6fGG53CwdU2Dz0T6bOycdb2+bAFAa3ymwWVkM= github.com/likexian/gokit v0.25.13/go.mod h1:qQhEWFBEfqLCO3/vOEo2EDKd+EycekVtUK4tex+l2H4= github.com/likexian/whois v1.15.1 h1:6vTMI8n9s1eJdmcO4R9h1x99aQWIZZX1CD3am68gApU= diff --git a/main.go b/main.go index 8e2274b..88926a9 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,6 @@ import ( "time" "github.com/golang-jwt/jwt/v5" - "github.com/joho/godotenv" "github.com/likexian/whois" "github.com/pquerna/otp/totp" "github.com/rs/cors" @@ -369,8 +368,6 @@ func handleValidateJwt(res http.ResponseWriter, req *http.Request) { } func main() { - godotenv.Load() - initMailer() generalCors := cors.New(cors.Options{