Skip to content

Commit 502286c

Browse files
committed
moved to sqlite go impl
1 parent 3d91580 commit 502286c

File tree

4 files changed

+70
-53
lines changed

4 files changed

+70
-53
lines changed

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
FROM golang:1.21 AS builder
1+
FROM golang:1.24-alpine AS builder
22

3-
RUN apt update && apt install -y gcc-aarch64-linux-gnu
3+
RUN apk add --no-cache git
44

55
WORKDIR /app
66
COPY . .
7+
8+
ENV CGO_ENABLED=0
79
RUN go mod download
8-
RUN GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" CC=aarch64-linux-gnu-gcc go build -o /app/segments
10+
RUN go build -o /app/segments
911

10-
FROM golang:1-bookworm
12+
FROM scratch
1113

1214
WORKDIR /app
1315
COPY --from=builder /app/segments /app/segments

go.mod

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,27 @@ module github.com/conformist-mw/segments
22

33
go 1.21.4
44

5+
require (
6+
github.com/gin-contrib/sessions v0.0.5
7+
github.com/gin-gonic/gin v1.9.1
8+
github.com/glebarez/sqlite v1.11.0
9+
github.com/go-playground/validator/v10 v10.18.0
10+
golang.org/x/crypto v0.19.0
11+
gorm.io/gorm v1.25.7
12+
)
13+
514
require (
615
github.com/bytedance/sonic v1.10.2 // indirect
716
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
817
github.com/chenzhuoyu/iasm v0.9.1 // indirect
18+
github.com/dustin/go-humanize v1.0.1 // indirect
919
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
10-
github.com/gin-contrib/sessions v0.0.5 // indirect
1120
github.com/gin-contrib/sse v0.1.0 // indirect
12-
github.com/gin-gonic/gin v1.9.1 // indirect
21+
github.com/glebarez/go-sqlite v1.21.2 // indirect
1322
github.com/go-playground/locales v0.14.1 // indirect
1423
github.com/go-playground/universal-translator v0.18.1 // indirect
15-
github.com/go-playground/validator/v10 v10.18.0 // indirect
1624
github.com/goccy/go-json v0.10.2 // indirect
25+
github.com/google/uuid v1.3.0 // indirect
1726
github.com/gorilla/context v1.1.1 // indirect
1827
github.com/gorilla/securecookie v1.1.1 // indirect
1928
github.com/gorilla/sessions v1.2.1 // indirect
@@ -23,20 +32,22 @@ require (
2332
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
2433
github.com/leodido/go-urn v1.4.0 // indirect
2534
github.com/mattn/go-isatty v0.0.20 // indirect
26-
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
2735
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
2836
github.com/modern-go/reflect2 v1.0.2 // indirect
2937
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
38+
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
3039
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
3140
github.com/ugorji/go/codec v1.2.12 // indirect
3241
github.com/wader/gormstore/v2 v2.0.0 // indirect
3342
golang.org/x/arch v0.7.0 // indirect
34-
golang.org/x/crypto v0.19.0 // indirect
3543
golang.org/x/net v0.21.0 // indirect
3644
golang.org/x/sys v0.17.0 // indirect
3745
golang.org/x/text v0.14.0 // indirect
3846
google.golang.org/protobuf v1.32.0 // indirect
3947
gopkg.in/yaml.v3 v3.0.1 // indirect
4048
gorm.io/driver/sqlite v1.5.4 // indirect
41-
gorm.io/gorm v1.25.5 // indirect
49+
modernc.org/libc v1.22.5 // indirect
50+
modernc.org/mathutil v1.5.0 // indirect
51+
modernc.org/memory v1.5.0 // indirect
52+
modernc.org/sqlite v1.23.1 // indirect
4253
)

0 commit comments

Comments
 (0)