heroku
[TOC]
安装
mac:brew tap heroku/brew && brew install heroku
登录
heroku login
创建
heroku create oyjx-portainer
# Creating ⬢ oyjx-portainer... done
# https://oyjx-portainer.herokuapp.com/ | https://git.heroku.com/oyjx-portainer.git
部署(已存在镜像)
推送
#打tag docker tag <image> registry.heroku.com/<app>/<process-type>
docker tag portainer/portainer registry.heroku.com/oyjx-portainer/portainer
#推送 docker push registry.heroku.com/<app>/<process-type>
docker push registry.heroku.com/oyjx-portainer/portainer
查看部署
heroku open -a oyjx-portainer

编译Go项目并部署
Getting Started on Heroku with Go
免费的数据库【以postgresql为例】
https://devcenter.heroku.com/articles/getting-started-with-go#use-a-database
heroku config 查看配置
heroku config
#=== polar-inlet-4930 Config Vars
#DATABASE_URL: postgres://username:password@host:5432/dbname
reference
最后更新于
这有帮助吗?