Skip to content
No description, website, or topics provided.
Go Dockerfile HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
handlers
k8s
templates
vendor
.gitignore
Dockerfile
Dockerfile-develop
README.md
go.mod
go.sum
main.go
skaffold.yaml

README.md

golang-packr-demo-fail

A demonstration of gobuffalo/packr. This is a simple website with static content like .js, .css, .jpg files. Packr allows for creation of a single binary, bundled with static files, that services a website. It also allows static files to be loaded from disk during development and testing.

This project uses skaffold for local development with kubernetes. With skaffold static files can be updated in a running container and only edits to .go files will trigger a rebuild.

Development Instructions

After checking out this repository locally:

$ skaffold dev

Changes to static files will be pushed to the running container and changes to .go files will trigger a rebuild.

Production Build Instructions

This will product an alpine image with a single built binary that contains all of this website's static files.

$ go build -t golang-packr-demo .
// optionally run the image
$ go run --name golang-packr-demo -e PORT 9000 -p 9000:9000 --rm golang-packr-demo
Listening port 9000
You can’t perform that action at this time.