Skip to content

Commit

Permalink
Upgraded dependencies and deprecated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
metamemelord committed Dec 22, 2022
1 parent a338d26 commit 17c795b
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 108 deletions.
22 changes: 12 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/golang:1-alpine as server-builder
FROM docker.io/library/golang:1-alpine AS server-builder
RUN apk add upx
WORKDIR /build
ENV GO111MODULE=on
Expand All @@ -7,18 +7,20 @@ RUN go install github.com/dmarkham/enumer@latest
COPY . .
RUN go generate ./...
RUN go build -v -ldflags="-s -w" -o portfolio
RUN upx portfolio

FROM docker.io/library/node:16-alpine as ui-builder
RUN upx -9 -k portfolio
 
FROM docker.io/library/node:16-alpine AS ui-builder
RUN npm install --location=global npm
WORKDIR /build
COPY . .
RUN npx browserslist@latest --update-db
RUN npm install
RUN npm run build

FROM alpine
WORKDIR /portfolio
COPY --from=ui-builder /build/dist ./dist
COPY --from=server-builder /build/portfolio .
CMD ["./portfolio"]

FROM docker.io/library/alpine AS pre-prod
COPY --from=server-builder /build/portfolio /bin
COPY --from=ui-builder /build/dist /srv/portfolio/dist

FROM scratch
COPY --from=pre-prod / /
CMD ["/bin/portfolio"]
61 changes: 33 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,65 @@ module github.com/metamemelord/portfolio-website
go 1.18

require (
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0
github.com/gin-contrib/cors v1.4.0
github.com/gin-gonic/gin v1.8.1
github.com/mailgun/mailgun-go/v4 v4.8.1
github.com/microsoft/kiota-authentication-azure-go v0.3.1
github.com/microsoftgraph/msgraph-sdk-go v0.28.0
go.mongodb.org/mongo-driver v1.9.1
github.com/microsoft/kiota-authentication-azure-go v0.5.0
github.com/microsoftgraph/msgraph-sdk-go v0.49.0
go.mongodb.org/mongo-driver v1.11.1
)

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v0.5.2 // indirect
github.com/cjlapao/common-go v0.0.21 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 // indirect
github.com/cjlapao/common-go v0.0.37 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.11.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/goccy/go-json v0.9.7 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt/v4 v4.4.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.15.6 // indirect
github.com/klauspost/compress v1.15.13 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/microsoft/kiota-abstractions-go v0.8.1 // indirect
github.com/microsoft/kiota-http-go v0.5.1 // indirect
github.com/microsoft/kiota-serialization-json-go v0.5.3 // indirect
github.com/microsoft/kiota-serialization-text-go v0.4.1 // indirect
github.com/microsoftgraph/msgraph-sdk-go-core v0.26.1 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/microsoft/kiota-abstractions-go v0.15.1 // indirect
github.com/microsoft/kiota-http-go v0.11.0 // indirect
github.com/microsoft/kiota-serialization-json-go v0.7.2 // indirect
github.com/microsoft/kiota-serialization-text-go v0.6.0 // indirect
github.com/microsoftgraph/msgraph-sdk-go-core v0.31.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/montanaflynn/stats v0.6.6 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/stretchr/testify v1.8.1 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/xdg-go/scram v1.1.2 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect
golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
go.opentelemetry.io/otel v1.11.2 // indirect
go.opentelemetry.io/otel/trace v1.11.2 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 17c795b

Please sign in to comment.