You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2021. It is now read-only.
B1nj0y edited this page Jan 8, 2018
·
19 revisions
One of Golang's smart features is its app could be compiled as a single executable binary. That's convenient for release and deployment.
But we can't compile the assets like stylesheet, javascript and images into this binary by a common go build. Of course there're some solutions indeed, but I don't take it an idiomatic way, and sometimes it's not fit well with some framework like Gin.
In fact Docker is very nice solution for Golang web app release and deployment. So go-on-rails will generate a Dockerfile at meanwhile when generating the application. You can find a Dockerfile in the go_app folder.
Now just run make image will build a docker image for the generated Golang app.
The docker image names after a format like USER/IMAGE:TAG, you can pass the parameters as arguments to make image command:
make image USER=goonr IMAGE=nice_app TAG=1.2.0
System username and other default values will be used if you omit them.