A simple template for deploy to AWS beanstalk
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


AWS Beanstalk Go Deploy Template

A simple golang project template for deploy to AWS beanstalk (using source code)

How to deploy

  • 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

File structure

  • .ebextensions (environment configs)
    • applogs.config (rotate app logs to S3 config)
  • src
    • app
      • main.go (webapp source code, that contains the main package )
  • build.sh (build commands)
  • Buildfile (custom build config)
  • Procfile (process config)