Merge branch 'main' of https://github.com/trafficlunar/api
This commit is contained in:
commit
4fb7905f9d
2 changed files with 12 additions and 6 deletions
16
Dockerfile
16
Dockerfile
|
|
@ -1,4 +1,5 @@
|
|||
FROM golang:1.24.1
|
||||
# build
|
||||
FROM golang:1.24.1 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -7,8 +8,15 @@ RUN go mod download
|
|||
|
||||
COPY . .
|
||||
|
||||
RUN go build -o /api .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o api .
|
||||
|
||||
EXPOSE 8080
|
||||
# copy
|
||||
FROM alpine:latest
|
||||
|
||||
CMD [ "/api" ]
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/api .
|
||||
|
||||
EXPOSE 8888
|
||||
|
||||
CMD [ "/app/api" ]
|
||||
|
|
|
|||
2
go.sum
2
go.sum
|
|
@ -14,8 +14,6 @@ github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aN
|
|||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||
github.com/lmittmann/tint v1.0.5 h1:NQclAutOfYsqs2F1Lenue6OoWCajs5wJcP3DfWVpePw=
|
||||
github.com/lmittmann/tint v1.0.5/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
|
||||
github.com/lmittmann/tint v1.0.6 h1:vkkuDAZXc0EFGNzYjWcV0h7eEX+uujH48f/ifSkJWgc=
|
||||
github.com/lmittmann/tint v1.0.6/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
|
||||
github.com/lmittmann/tint v1.0.7 h1:D/0OqWZ0YOGZ6AyC+5Y2kD8PBEzBk6rFHVSfOqCkF9Y=
|
||||
|
|
|
|||
Loading…
Reference in a new issue