Compare commits

..

3 Commits

Author SHA1 Message Date
RecordingTheSmile 41dfe9ff54 feat: add support for Asia/Shanghai timezone and include rootcerts dependency 2025-11-03 11:32:11 +08:00
RecordingTheSmile 18fc1cee7a fix: remove redundant line in Dockerfile build command 2025-11-02 22:39:33 +08:00
RecordingTheSmile edefba7e32 feat: update Dockerfile to include shared object files and improve build process 2025-11-02 22:34:43 +08:00
5 changed files with 22 additions and 4 deletions
+4 -3
View File
@@ -1,17 +1,18 @@
FROM golang:alpine as backend-builder
FROM golang:alpine AS backend-builder
WORKDIR /build
COPY . .
RUN go build -ldflags="-s -w" -o bin/server cmd/server
RUN go build -ldflags="-s -w" -o bin/server
RUN apk add --no-cache upx
RUN upx --best --lzma bin/server
FROM alpine:latest
RUN apk add --no-cache onnxruntime
COPY --from=backend-builder /build/bin/server /app/server
COPY static /app/static
COPY static/*.so /app/
WORKDIR /app
EXPOSE 8080
RUN ls -a
CMD ["./server"]
+1
View File
@@ -9,6 +9,7 @@ require (
github.com/aws/aws-sdk-go-v2 v1.36.6
github.com/aws/aws-sdk-go-v2/credentials v1.17.71
github.com/aws/aws-sdk-go-v2/service/s3 v1.84.1
github.com/breml/rootcerts v0.3.3
github.com/bytedance/sonic v1.14.0
github.com/deatil/go-cryptobin v1.1.1005
github.com/go-sql-driver/mysql v1.9.3
+2
View File
@@ -44,6 +44,8 @@ github.com/aws/smithy-go v1.22.4 h1:uqXzVZNuNexwc/xrh6Tb56u89WDlJY6HS+KC0S4QSjw=
github.com/aws/smithy-go v1.22.4/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI=
github.com/bmatcuk/doublestar v1.3.4 h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0=
github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
github.com/breml/rootcerts v0.3.3 h1://GnaRtQ/9BY2+GtMk2wtWxVdCRysiaPr5/xBwl7NKw=
github.com/breml/rootcerts v0.3.3/go.mod h1:S/PKh+4d1HUn4HQovEB8hPJZO6pUZYrIhmXBhsegfXw=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
+15 -1
View File
@@ -1,13 +1,27 @@
package main
import (
_ "go.uber.org/automaxprocs"
"likedream-goframe/cmd/entc"
"likedream-goframe/cmd/server"
"likedream-goframe/internal/cst"
"log"
"os"
"time"
_ "time/tzdata"
_ "github.com/breml/rootcerts"
_ "go.uber.org/automaxprocs"
)
func main() {
// fix: time: unknown time zone Asia/Shanghai
var err error
cst.TimeZoneShangHai, err = time.LoadLocation("Asia/Shanghai")
if err != nil {
log.Panic(err)
}
args := ""
if len(os.Args) > 1 {
args = os.Args[1]
Binary file not shown.