Skip to content

Commit

Permalink
Upgrade Packages (#16)
Browse files Browse the repository at this point in the history
* Upgrade Buffalo

* Upgrade Go, Direct Depends

* Added github-actions to the dependabot.yml. Updated go packages. Moved main.go into cmd/app/ so it can work with updated buffalo. Updated Dockerfile and Dockerfile.local to use the augmented build so Go could be upgraded to 1.21.3

* Fix exposed port

* Python appears to be already included

* Removed manual build of aws-cli in Dockerfile and used apk add

---------

Co-authored-by: Tristen Lawrence <tristen.lawrence@yale.edu>
Co-authored-by: bt353 <brandon.tassone@yale.edu>
  • Loading branch information
3 people committed Nov 16, 2023
1 parent de4b1f0 commit 048a094
Show file tree
Hide file tree
Showing 7 changed files with 830 additions and 202 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
go-version:
- "1.18.x"
- "1.21.x"
os:
- "ubuntu-latest"

Expand Down
File renamed without changes.
37 changes: 28 additions & 9 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# This is a multi-stage Dockerfile and requires >= Docker 17.05
# https://docs.docker.com/engine/userguide/eng-image/multistage-build/
FROM gobuffalo/buffalo:v0.16.15 as builder
FROM golang:1.21.3-alpine as gobuff

EXPOSE 8080

ENV GOPROXY=https://proxy.golang.org

RUN apk add --no-cache --upgrade apk-tools \
&& apk add --no-cache bash curl openssl git build-base nodejs npm sqlite sqlite-dev mysql-client vim postgresql libpq postgresql-contrib libc6-compat

# Installing linter
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh \
| sh -s -- -b $(go env GOPATH)/bin v1.55.2

# Installing Yarn
RUN npm i -g --no-progress yarn \
&& yarn config set yarn-offline-mirror /npm-packages-offline-cache \
&& yarn config set yarn-offline-mirror-pruning true

# Installing buffalo binary
RUN go install github.com/gobuffalo/cli/cmd/buffalo@latest
RUN go install github.com/gobuffalo/buffalo-pop/v3@latest

RUN mkdir /src
WORKDIR /src

FROM gobuff as builder

ARG version=0.0.0
ARG prerelease
Expand All @@ -21,13 +44,9 @@ RUN buffalo build --static -o /bin/app --ldflags "-X github.com/YaleSpinup/proct
FROM alpine
RUN apk add --no-cache bash
RUN apk add --no-cache python3
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN apk add --no-cache ca-certificates
RUN apk add --no-cache wget gettext && \
wget -nv "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" && \
unzip awscli-bundle.zip && \
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws && \
/usr/local/bin/aws --version
RUN apk add --no-cache wget gettext
RUN apk add --no-cache aws-cli

WORKDIR /bin/

Expand Down
29 changes: 26 additions & 3 deletions docker/Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# This is a multi-stage Dockerfile and requires >= Docker 17.05
# https://docs.docker.com/engine/userguide/eng-image/multistage-build/
FROM gobuffalo/buffalo:v0.14.9 as builder
FROM golang:1.21.3-alpine as gobuff

EXPOSE 3000

ENV GOPROXY=https://proxy.golang.org

RUN apk add --no-cache --upgrade apk-tools \
&& apk add --no-cache bash curl openssl git build-base nodejs npm sqlite sqlite-dev mysql-client vim postgresql libpq postgresql-contrib libc6-compat

# Installing linter
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh \
| sh -s -- -b $(go env GOPATH)/bin v1.55.2

# Installing Yarn
RUN npm i -g --no-progress yarn \
&& yarn config set yarn-offline-mirror /npm-packages-offline-cache \
&& yarn config set yarn-offline-mirror-pruning true

# Installing buffalo binary
RUN go install github.com/gobuffalo/cli/cmd/buffalo@latest
RUN go install github.com/gobuffalo/buffalo-pop/v3@latest

RUN mkdir /src
WORKDIR /src

FROM gobuff as builder

RUN mkdir /app
WORKDIR /app
Expand Down
101 changes: 50 additions & 51 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,67 +1,65 @@
module github.com/YaleSpinup/proctor

go 1.18
go 1.21

require (
github.com/aws/aws-sdk-go v1.44.98
github.com/gobuffalo/buffalo v1.0.0
github.com/aws/aws-sdk-go v1.47.11
github.com/gobuffalo/buffalo v1.1.0
github.com/gobuffalo/envy v1.10.2
github.com/gobuffalo/mw-paramlogger v1.0.1
github.com/gobuffalo/packr/v2 v2.8.0
github.com/gobuffalo/suite/v3 v3.0.0
github.com/gobuffalo/mw-paramlogger v1.0.2
github.com/gobuffalo/packr/v2 v2.8.3
github.com/gobuffalo/suite/v3 v3.0.2
github.com/gobuffalo/x v0.1.0
github.com/gofrs/uuid v4.3.0+incompatible
github.com/rs/cors v1.8.2
github.com/gofrs/uuid v4.4.0+incompatible
github.com/rs/cors v1.10.1
)

require (
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/cockroachdb/cockroach-go v2.0.1+incompatible // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-sql-driver/mysql v1.7.1 // indirect
github.com/gobuffalo/events v1.4.3 // indirect
github.com/gobuffalo/fizz v1.14.2 // indirect
github.com/gobuffalo/flect v0.3.0 // indirect
github.com/gobuffalo/github_flavored_markdown v1.1.2 // indirect
github.com/gobuffalo/fizz v1.14.4 // indirect
github.com/gobuffalo/flect v1.0.2 // indirect
github.com/gobuffalo/github_flavored_markdown v1.1.4 // indirect
github.com/gobuffalo/grift v1.5.2 // indirect
github.com/gobuffalo/helpers v0.6.6 // indirect
github.com/gobuffalo/httptest v1.5.1 // indirect
github.com/gobuffalo/helpers v0.6.7 // indirect
github.com/gobuffalo/httptest v1.5.2 // indirect
github.com/gobuffalo/logger v1.0.7 // indirect
github.com/gobuffalo/meta v0.3.3 // indirect
github.com/gobuffalo/mw-csrf v1.0.0 // indirect
github.com/gobuffalo/mw-csrf v1.0.2 // indirect
github.com/gobuffalo/nulls v0.4.2 // indirect
github.com/gobuffalo/packd v1.0.2 // indirect
github.com/gobuffalo/plush/v4 v4.1.15 // indirect
github.com/gobuffalo/pop/v5 v5.0.9 // indirect
github.com/gobuffalo/pop/v6 v6.0.6 // indirect
github.com/gobuffalo/refresh v1.13.2 // indirect
github.com/gobuffalo/plush/v4 v4.1.19 // indirect
github.com/gobuffalo/pop/v5 v5.3.4 // indirect
github.com/gobuffalo/refresh v1.13.3 // indirect
github.com/gobuffalo/tags/v3 v3.1.4 // indirect
github.com/gobuffalo/validate/v3 v3.3.3 // indirect
github.com/gofrs/uuid/v3 v3.1.2 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/sessions v1.2.1 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/gorilla/handlers v1.5.2 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/gorilla/sessions v1.2.2 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.13.0 // indirect
github.com/jackc/pgconn v1.14.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.12.0 // indirect
github.com/jackc/pgx/v4 v4.17.2 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/pgx/v4 v4.18.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmoiron/sqlx v1.3.5 // indirect
github.com/joho/godotenv v1.4.0 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/karrick/godirwalk v1.17.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/lib/pq v1.10.7 // indirect
Expand All @@ -70,27 +68,28 @@ require (
github.com/markbates/oncer v1.0.0 // indirect
github.com/markbates/safe v1.0.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
github.com/microcosm-cc/bluemonday v1.0.20 // indirect
github.com/microcosm-cc/bluemonday v1.0.26 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/monoculum/formam v3.5.5+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect
github.com/spf13/cobra v1.5.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.0 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
golang.org/x/sync v0.0.0-20220907140024-f12130a52804 // indirect
golang.org/x/sys v0.0.0-20220913175220-63ea55921009 // indirect
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
golang.org/x/text v0.3.7 // indirect
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/term v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
Loading

0 comments on commit 048a094

Please sign in to comment.