Deploying Go 1.6 web app to AWS Elastic Beanstalk?

不问归期 提交于 2019-12-04 16:19:54

The best choice would be to use docker.

Here are the steps to deploy your application to Elastic Beanstalk:

  1. Choose the Generic Docker platform when creating a new environment.
  2. Put a file named Dockerfile in your project root with the following content:

FROM golang:1.6.2-onbuild
EXPOSE 80

  1. Add a canonical import path to your main.go. For example, if your package name is my/package the first line of main.go should be package main // import "my/package"
  2. Make your application listen on port 80
  3. Deploy!
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!