Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "production"

env:
MONGO_VERSION: 6.0.4
MONGO_VERSION: 6.0.8
UBUNTU_VERSION: linux-x86_64-ubuntu2004
# name of the binary, the service and the user running the
# service
Expand All @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.21'

- name: Vet code
run: go vet ./...
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- production

env:
MONGO_VERSION: 6.0.4
MONGO_VERSION: 6.0.8
UBUNTU_VERSION: linux-x86_64-ubuntu2004

jobs:
Expand All @@ -21,12 +21,12 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '1.20'
go-version: '1.21'

- name: Lint code
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.1
version: v1.54.1
args: --timeout 2m0s

- name: Vet code
Expand Down
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM node:19-alpine as builder

WORKDIR /

COPY ./internal ./

COPY ./internal/web ./

WORKDIR /internal/web

COPY ./internal/web/bundle.sh ./

RUN npm i

RUN chmod +x bundle.sh

FROM golang:1.21-alpine

WORKDIR /app

COPY --from=builder ./internal ./

COPY --from=builder ./internal/web ./

# Download Go modules
COPY go.mod go.sum ./
RUN go mod download

COPY . .

COPY *.go ./

# Build
RUN go build -v -o /mongoplayground

EXPOSE 8080

# Run
CMD ["/mongoplayground"]
31 changes: 16 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ require (
github.com/feliixx/boa v0.2.2
github.com/feliixx/mgodatagen v0.11.2
github.com/feliixx/mongoextjson v1.2.0
github.com/prometheus/client_golang v1.14.0
go.mongodb.org/mongo-driver v1.11.1
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1
github.com/prometheus/client_golang v1.16.0
go.mongodb.org/mongo-driver v1.11.9
golang.org/x/oauth2 v0.5.0
google.golang.org/api v0.95.0
)

Expand All @@ -19,13 +19,13 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/brianvoe/gofakeit/v6 v6.2.2 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect
Expand All @@ -36,25 +36,26 @@ require (
github.com/klauspost/compress v1.13.6 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rogpeppe/go-internal v1.11.0 // 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/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
go.opencensus.io v0.23.0 // 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-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f // indirect
google.golang.org/grpc v1.47.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
)
Loading