Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #816 from gobuffalo/set-docker-addr
Browse files Browse the repository at this point in the history
set the default binding address of generated Dockerfiles
  • Loading branch information
markbates authored Dec 20, 2017
2 parents 39db630 + d13b4f2 commit 4a35c4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions generators/docker/multi/templates/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ FROM alpine
RUN apk add --no-cache bash
RUN apk add --no-cache ca-certificates

# Comment out to run the binary in "production" mode:
# ENV GO_ENV=production

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:
Expand Down
6 changes: 6 additions & 0 deletions generators/docker/standard/templates/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ RUN go get $(go list ./... | grep -v /vendor/)
{{end -}}
RUN buffalo build --static -o /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:
Expand Down

0 comments on commit 4a35c4c

Please sign in to comment.