A simple golang project template for deploy to AWS beanstalk (using source code)
- Clone
simple-template
- Put webapp go source code into
src/app
folder - Make sure webapp that listen to port
os.Getenv("PORT")
- Collect all dependency package source to into
src/vendor
folder using management tool, such as govendor, dep, godep, glide, ...etc - Modify config files if necessary
- Compress all files under
simple-template
into a zip file (as a source bundle) - Upload source bundle to AWS beanstalk and deploy it
- Done
For more information, see AWS document: Deploying Go Applications to Elastic Beanstalk Applications
- .ebextensions (environment configs)
- applogs.config (rotate app logs to S3 config)
- src
- app
- main.go (webapp source code, that contains the
main
package )
- main.go (webapp source code, that contains the
- app
- build.sh (build commands)
- Buildfile (custom build config)
- Procfile (process config)