Skip to content

Commit

Permalink
Go 1.19 support (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shpota committed Dec 3, 2022
1 parent 5afb6d2 commit a0abea2
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 46 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
- name: Set up Go 1.19
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.19
id: go
- name: Check out
uses: actions/checkout@v2
Expand All @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: [ 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17 ]
go: [ 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18 ]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v1
Expand Down
42 changes: 21 additions & 21 deletions static/generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -1262,18 +1262,18 @@ context.keys().map(context);
"codelyzer"
]
}`,
"mongo.Dockerfile": `FROM node:16.14.2-alpine3.15 AS JS_BUILD
"mongo.Dockerfile": `FROM node:16.18.1-alpine3.16 AS JS_BUILD
COPY webapp /webapp
WORKDIR webapp
RUN npm install && npm run build
FROM golang:1.18.1-alpine3.15 AS GO_BUILD
FROM golang:1.19.0-alpine3.16 AS GO_BUILD
RUN apk update && apk add build-base
COPY server /server
WORKDIR /server
RUN go build -o /go/bin/server
FROM alpine:3.13.5
FROM alpine:3.16.3
COPY --from=JS_BUILD /webapp/build* ./webapp/
COPY --from=GO_BUILD /go/bin/server ./
CMD ./server
Expand Down Expand Up @@ -1341,18 +1341,18 @@ docker-compose up
This will build the application and start it together with
its database. Access the application on http://localhost:8080.
`,
"mongo.docker-compose-dev.yml": `version: "3.7"
"mongo.docker-compose-dev.yml": `version: "3.8"
services:
dev_db:
image: mongo:4.4.5
image: mongo:6.0.3
environment:
MONGO_INITDB_DATABASE: tech
ports:
- 27017:27017
volumes:
- ./init-db.js:/docker-entrypoint-initdb.d/init.js
`,
"mongo.docker-compose.yml": `version: "3.7"
"mongo.docker-compose.yml": `version: "3.8"
services:
app:
build: .
Expand All @@ -1364,7 +1364,7 @@ services:
environment:
profile: prod
db:
image: mongo:4.4.5
image: mongo:6.0.3
container_name: db
environment:
MONGO_INITDB_DATABASE: tech
Expand Down Expand Up @@ -1529,17 +1529,17 @@ func clientOptions() *options.ClientOptions {
)
}
`,
"mysql.Dockerfile": `FROM node:16.14.2-alpine3.15 AS JS_BUILD
"mysql.Dockerfile": `FROM node:16.18.1-alpine3.16 AS JS_BUILD
COPY webapp /webapp
WORKDIR webapp
RUN npm install && npm run build
FROM golang:1.18.1-alpine3.15 AS GO_BUILD
FROM golang:1.19.0-alpine3.16 AS GO_BUILD
COPY server /server
WORKDIR /server
RUN go build -o /go/bin/server
FROM alpine:3.13.5
FROM alpine:3.16.3
COPY --from=JS_BUILD /webapp/build* ./webapp/
COPY --from=GO_BUILD /go/bin/server ./
CMD ./server
Expand Down Expand Up @@ -1603,10 +1603,10 @@ docker-compose up
This will build the application and start it together with
its database. Access the application on http://localhost:8080.
`,
"mysql.docker-compose-dev.yml": `version: "3.7"
"mysql.docker-compose-dev.yml": `version: "3.8"
services:
dev_db:
image: mysql:8.0.23
image: mysql:8.0.31
environment:
MYSQL_DATABASE: goxygen
MYSQL_USER: goxygen
Expand All @@ -1617,7 +1617,7 @@ services:
volumes:
- ./init-db.sql:/docker-entrypoint-initdb.d/init.sql
`,
"mysql.docker-compose.yml": `version: "3.7"
"mysql.docker-compose.yml": `version: "3.8"
services:
app:
build: .
Expand All @@ -1630,7 +1630,7 @@ services:
profile: prod
db_pass: pass
db:
image: mysql:8.0.23
image: mysql:8.0.31
container_name: db
environment:
MYSQL_DATABASE: goxygen
Expand Down Expand Up @@ -1733,17 +1733,17 @@ func dataSource() string {
return "goxygen:" + pass + "@tcp(" + host + ":3306)/goxygen"
}
`,
"postgres.Dockerfile": `FROM node:16.14.2-alpine3.15 AS JS_BUILD
"postgres.Dockerfile": `FROM node:16.18.1-alpine3.16 AS JS_BUILD
COPY webapp /webapp
WORKDIR webapp
RUN npm install && npm run build
FROM golang:1.18.1-alpine3.15 AS GO_BUILD
FROM golang:1.19.0-alpine3.16 AS GO_BUILD
COPY server /server
WORKDIR /server
RUN go build -o /go/bin/server
FROM alpine:3.13.5
FROM alpine:3.16.3
COPY --from=JS_BUILD /webapp/build* ./webapp/
COPY --from=GO_BUILD /go/bin/server ./
CMD ./server
Expand Down Expand Up @@ -1807,10 +1807,10 @@ docker-compose up
This will build the application and start it together with
its database. Access the application on http://localhost:8080.
`,
"postgres.docker-compose-dev.yml": `version: "3.7"
"postgres.docker-compose-dev.yml": `version: "3.8"
services:
dev_db:
image: postgres:9.6.21-alpine
image: postgres:15.1-alpine3.17
environment:
POSTGRES_PASSWORD: pass
POSTGRES_USER: goxygen
Expand All @@ -1820,7 +1820,7 @@ services:
volumes:
- ./init-db.sql:/docker-entrypoint-initdb.d/init.sql
`,
"postgres.docker-compose.yml": `version: "3.7"
"postgres.docker-compose.yml": `version: "3.8"
services:
app:
build: .
Expand All @@ -1833,7 +1833,7 @@ services:
profile: prod
db_pass: pass
db:
image: postgres:9.6.21-alpine
image: postgres:15.1-alpine3.17
environment:
POSTGRES_PASSWORD: pass
POSTGRES_USER: goxygen
Expand Down
6 changes: 3 additions & 3 deletions templates/mongo.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM node:16.14.2-alpine3.15 AS JS_BUILD
FROM node:16.18.1-alpine3.16 AS JS_BUILD
COPY webapp /webapp
WORKDIR webapp
RUN npm install && npm run build

FROM golang:1.18.1-alpine3.15 AS GO_BUILD
FROM golang:1.19.0-alpine3.16 AS GO_BUILD
RUN apk update && apk add build-base
COPY server /server
WORKDIR /server
RUN go build -o /go/bin/server

FROM alpine:3.13.5
FROM alpine:3.16.3
COPY --from=JS_BUILD /webapp/build* ./webapp/
COPY --from=GO_BUILD /go/bin/server ./
CMD ./server
4 changes: 2 additions & 2 deletions templates/mongo.docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.7"
version: "3.8"
services:
dev_db:
image: mongo:4.4.5
image: mongo:6.0.3
environment:
MONGO_INITDB_DATABASE: tech
ports:
Expand Down
4 changes: 2 additions & 2 deletions templates/mongo.docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.7"
version: "3.8"
services:
app:
build: .
Expand All @@ -10,7 +10,7 @@ services:
environment:
profile: prod
db:
image: mongo:4.4.5
image: mongo:6.0.3
container_name: db
environment:
MONGO_INITDB_DATABASE: tech
Expand Down
6 changes: 3 additions & 3 deletions templates/mysql.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM node:16.14.2-alpine3.15 AS JS_BUILD
FROM node:16.18.1-alpine3.16 AS JS_BUILD
COPY webapp /webapp
WORKDIR webapp
RUN npm install && npm run build

FROM golang:1.18.1-alpine3.15 AS GO_BUILD
FROM golang:1.19.0-alpine3.16 AS GO_BUILD
COPY server /server
WORKDIR /server
RUN go build -o /go/bin/server

FROM alpine:3.13.5
FROM alpine:3.16.3
COPY --from=JS_BUILD /webapp/build* ./webapp/
COPY --from=GO_BUILD /go/bin/server ./
CMD ./server
4 changes: 2 additions & 2 deletions templates/mysql.docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.7"
version: "3.8"
services:
dev_db:
image: mysql:8.0.23
image: mysql:8.0.31
environment:
MYSQL_DATABASE: goxygen
MYSQL_USER: goxygen
Expand Down
4 changes: 2 additions & 2 deletions templates/mysql.docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.7"
version: "3.8"
services:
app:
build: .
Expand All @@ -11,7 +11,7 @@ services:
profile: prod
db_pass: pass
db:
image: mysql:8.0.23
image: mysql:8.0.31
container_name: db
environment:
MYSQL_DATABASE: goxygen
Expand Down
6 changes: 3 additions & 3 deletions templates/postgres.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM node:16.14.2-alpine3.15 AS JS_BUILD
FROM node:16.18.1-alpine3.16 AS JS_BUILD
COPY webapp /webapp
WORKDIR webapp
RUN npm install && npm run build

FROM golang:1.18.1-alpine3.15 AS GO_BUILD
FROM golang:1.19.0-alpine3.16 AS GO_BUILD
COPY server /server
WORKDIR /server
RUN go build -o /go/bin/server

FROM alpine:3.13.5
FROM alpine:3.16.3
COPY --from=JS_BUILD /webapp/build* ./webapp/
COPY --from=GO_BUILD /go/bin/server ./
CMD ./server
4 changes: 2 additions & 2 deletions templates/postgres.docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.7"
version: "3.8"
services:
dev_db:
image: postgres:9.6.21-alpine
image: postgres:15.1-alpine3.17
environment:
POSTGRES_PASSWORD: pass
POSTGRES_USER: goxygen
Expand Down
4 changes: 2 additions & 2 deletions templates/postgres.docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.7"
version: "3.8"
services:
app:
build: .
Expand All @@ -11,7 +11,7 @@ services:
profile: prod
db_pass: pass
db:
image: postgres:9.6.21-alpine
image: postgres:15.1-alpine3.17
environment:
POSTGRES_PASSWORD: pass
POSTGRES_USER: goxygen
Expand Down
2 changes: 1 addition & 1 deletion transform/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module transform

go 1.18
go 1.19

0 comments on commit a0abea2

Please sign in to comment.