-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update vercel configuration & repo structure
- Loading branch information
Showing
8 changed files
with
33 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
FROM golang:1.13 AS build-env | ||
FROM golang:1.18 AS build-env | ||
|
||
WORKDIR /qrgo | ||
COPY qrgo.go go.mod go.sum ./ | ||
COPY main ./main | ||
COPY main.go go.mod go.sum ./ | ||
COPY api ./api | ||
|
||
RUN bash -c "go mod download &> /dev/null" | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux go build -o app -ldflags "-s -w" ./main | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o app -ldflags "-s -w" ./ | ||
|
||
FROM gcr.io/distroless/static:latest | ||
FROM gcr.io/distroless/static:nonroot | ||
COPY --from=build-env /qrgo/app . | ||
CMD ["./app"] | ||
CMD ["./app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module elsesiy/qrgo | ||
module github.com/elsesiy/qrgo | ||
|
||
go 1.13 | ||
go 1.18 | ||
|
||
require github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086 | ||
require github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9 h1:lpEzuenPuO1XNTeikEmvqYFcU37GVLl8SRNblzyvGBE= | ||
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo= | ||
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086 h1:RYiqpb2ii2Z6J4x0wxK46kvPBbFuZcdhS+CIztmYgZs= | ||
github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo= | ||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= | ||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
package main | ||
|
||
import ( | ||
"elsesiy/qrgo" | ||
"log" | ||
"net/http" | ||
"os" | ||
|
||
qrgo "github.com/elsesiy/qrgo/api" | ||
) | ||
|
||
func main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"version": 2, | ||
"build": { | ||
"env": { | ||
"GO_BUILD_FLAGS": "-ldflags '-s -w'" | ||
} | ||
}, | ||
"rewrites": [ | ||
{ | ||
"source": "/(.*)", | ||
"destination": "/api/qrgo.go" | ||
}, | ||
{ | ||
"source": "/", | ||
"destination": "/api/qrgo.go" | ||
} | ||
] | ||
} |
6a99317
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
qrgo – ./
qrgo-git-master-elsesiy.vercel.app
qrgo-elsesiy.vercel.app