-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Episode 24 - Resources in Buffalo (#166)
* Adding basic episode 24 things * updating ep22 to ep24 * removing unused endpoints * adding a bunch of node modules * removing tmp * removing binary * Adding show notes * Adding generated code * adding episode 24 * removing patreon thing
- Loading branch information
Showing
15,635 changed files
with
2,077,755 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
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,3 @@ | ||
{ | ||
"presets": ["env"] | ||
} |
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,21 @@ | ||
app_root: . | ||
ignored_folders: | ||
- vendor | ||
- log | ||
- logs | ||
- assets | ||
- public | ||
- grifts | ||
- tmp | ||
- bin | ||
- node_modules | ||
- .sass-cache | ||
included_extensions: | ||
- .go | ||
- .env | ||
build_path: tmp | ||
build_delay: 200ns | ||
binary_name: episode24-build | ||
command_flags: [] | ||
enable_colors: true | ||
log_name: buffalo |
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,20 @@ | ||
engines: | ||
fixme: | ||
enabled: true | ||
gofmt: | ||
enabled: true | ||
golint: | ||
enabled: true | ||
govet: | ||
enabled: true | ||
exclude_paths: | ||
- grifts/**/* | ||
- "**/*_test.go" | ||
- "*_test.go" | ||
- "**_test.go" | ||
- logs/* | ||
- public/* | ||
- templates/* | ||
ratings: | ||
paths: | ||
- "**.go" |
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,3 @@ | ||
node_modules/ | ||
*.log | ||
bin/ |
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,9 @@ | ||
# This .env file was generated by buffalo, add here the env variables you need | ||
# buffalo to load into the ENV on application startup so your application works correctly. | ||
# To add variables use KEY=VALUE format, you can later retrieve this in your application | ||
# by using os.Getenv("KEY"). | ||
# | ||
# Example: | ||
# DATABASE_PASSWORD=XXXXXXXXX | ||
# SESSIONS_SECRET=XXXXXXXXX | ||
# SMTP_SERVER=XXXXXXXXX |
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,34 @@ | ||
# 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.11.0 as builder | ||
|
||
RUN mkdir -p $GOPATH/src/github.com/arschles/go-in-5-minutes/episode24 | ||
WORKDIR $GOPATH/src/github.com/arschles/go-in-5-minutes/episode24 | ||
|
||
# this will cache the npm install step, unless package.json changes | ||
ADD package.json . | ||
ADD yarn.lock . | ||
RUN yarn install --no-progress | ||
ADD . . | ||
RUN go get $(go list ./... | grep -v /vendor/) | ||
RUN buffalo build --static -o /bin/app | ||
|
||
FROM alpine | ||
RUN apk add --no-cache bash | ||
RUN apk add --no-cache ca-certificates | ||
|
||
WORKDIR /bin/ | ||
|
||
COPY --from=builder /bin/app . | ||
|
||
# Comment out to run the binary in "production" mode: | ||
# ENV GO_ENV=production | ||
|
||
# Bind the app to 0.0.0.0 so it can be seen from outside the container | ||
ENV ADDR=0.0.0.0 | ||
|
||
EXPOSE 3000 | ||
|
||
# Comment out to run the migrations before running the binary: | ||
# CMD /bin/app migrate; /bin/app | ||
CMD exec /bin/app |
Oops, something went wrong.