Skip to content

Commit

Permalink
Episode 24 - Resources in Buffalo (#166)
Browse files Browse the repository at this point in the history
* 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
arschles committed Oct 31, 2018
1 parent 0c95072 commit b590d17
Show file tree
Hide file tree
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.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ episode22/node_modules
episode22/tmp
episode22/public
episode22/public/*
episode24/tmp
episode24/tmp/episode24-build
3 changes: 3 additions & 0 deletions episode24/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["env"]
}
21 changes: 21 additions & 0 deletions episode24/.buffalo.dev.yml
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
20 changes: 20 additions & 0 deletions episode24/.codeclimate.yml
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"
3 changes: 3 additions & 0 deletions episode24/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
*.log
bin/
9 changes: 9 additions & 0 deletions episode24/.env
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
34 changes: 34 additions & 0 deletions episode24/Dockerfile
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
Loading

0 comments on commit b590d17

Please sign in to comment.