Skip to content
Permalink
Browse files

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...
arschles committed Oct 31, 2018
1 parent 0c95072 commit b590d17a1b21c4ec349e5b293e6f4f9f82518783
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.
@@ -39,3 +39,5 @@ episode22/node_modules
episode22/tmp
episode22/public
episode22/public/*
episode24/tmp
episode24/tmp/episode24-build
@@ -0,0 +1,3 @@
{
"presets": ["env"]
}
@@ -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
@@ -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"
@@ -0,0 +1,3 @@
node_modules/
*.log
bin/
@@ -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
@@ -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

0 comments on commit b590d17

Please sign in to comment.
You can’t perform that action at this time.