Question: Best places to deploy a Go project with database?

blov · · 993 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hey gophers!</p> <p>I am implementing a Go web app and I am looking for good places to deploy the code. A good one I know is Google App Engine but I kinda want to use postgres as a database for the project and I don&#39;t think that&#39;s possible in GAE. Also GAE is stuck using an old go version as far as I know.</p> <p>The project is small, I don&#39;t need huge scaling or anything fancy. If there&#39;s a free tier, even better.</p> <p>Any good recommendations for Go + a database like postgres?</p> <hr/>**评论:**<br/><br/>flippeeer: <pre><p><a href="https://www.heroku.com/">Heroku</a></p> <p>It&#39;s a PaaS like Google App Engine. They also have Postgres and even a free tier! You can get started <a href="https://devcenter.heroku.com/articles/getting-started-with-go#introduction">here</a></p></pre>mkolppp: <pre><p>Do PaaS providers like Heroku bill Go apps less because they&#39;re faster than equivalent Python and Ruby apps?</p></pre>jrwren: <pre><p>Not exactly like that. Since a single heroku dyno running a go service, services a single request faster than equivalent python and ruby, one would need less heroku dynos and thus pay less.</p></pre>fortytw2: <pre><p>You pay per instance running your app on heroku, not based on arbitrary usage calculations. </p></pre>Ribice: <pre><p>I Personally just rent a VPS. </p> <p>hetzner.de is cheap but looks outdated, digitalocean if you want fancy stuff.. There are plenty of guides for installing psql on VPS.</p></pre>ragefacesmirk: <pre><p>Pivotal web services (PWS) seems to work well</p></pre>itsenov: <pre><p>Give Heroku a try. It supports latest Go versions and has a PostgreSQL DB. The prices are very competitive. </p></pre>WillTheHatt: <pre><p>We run go on AWS / GCP, I personally run go on DO / Vultr too, my favorite though is kubernetes and create a service that just uses an external RDS postgres db. That way all additional micro services i create that use the same db can just use the built in service. And best of all... no maintenance.</p></pre>PaluMacil: <pre><p>I too use Vultr. It&#39;s good despite being cheap. Quite a lot of power for the dollar.</p></pre>nesigma: <pre><p>Sorry I am new to this. Where do you deploy kubernetes?</p></pre>lobster_johnson: <pre><p>Google Container Engine = managed Kubernetes.</p></pre>usernameliteral: <pre><p><em>You</em> don&#39;t need Kubernetes. Use Heroku as <a href="/u/flippeeer" rel="nofollow">/u/flippeeer</a> suggested, it&#39;s easy to use and there&#39;s a free tier.</p></pre>George3d6: <pre><p>If you need fast connection and a good price/quality ratio OVH is the place to go, their servers are anywhere between 3 to 10 times cheaper than do, heroku or AWS.</p> <p>Only downside is that their us data center are not all finished, but I assume you just need a machine to play around \w, not a couple of heavy trafic servers around the world, so that shouldn&#39;t be a problem.</p></pre>deegood: <pre><p>Red Hat now has a free offering for OpenShift (aka Kubernetes), it should be enough for a go app and postgres db although there are some restrictions. <a href="https://manage.openshift.com/" rel="nofollow">https://manage.openshift.com/</a></p></pre>kaeshiwaza: <pre><p>In Europe you take a vps or a bare-metal here <a href="https://scaleway.com" rel="nofollow">https://scaleway.com</a> and if you don&#39;t want to install your own postgresql, just near there is <a href="https://www.online.net/en/ods" rel="nofollow">https://www.online.net/en/ods</a></p> <p>Thanks to Go it&#39;s very easy to setup.</p></pre>psankar: <pre><p>If you deploy using Docker, you can use Amazon Elastic Beanstalk which simplify a lot of things (HTTPS, Load balancing, etc.) It works in the free tier if you use a single instance. Amazon RDS has postgres too.</p> <p>We have a simple shell script which will build golang binary and scp it to the production VM (ec2 free tier).</p></pre>SeerUD: <pre><p>A VPS from DigitalOcean, Vultr, Scaleway, Linode, Lightsail, or w/e will be fine. They&#39;re very cheap, and you can install Postgres easily along with your Go application. SUPER easily if you use Docker.</p></pre>nesigma: <pre><p>Thanks for the suggestion. I&#39;ve tried DigitalOcean and it is indeed easy. It looks like a very good solution.</p> <blockquote> <p>SUPER easily if you use Docker.</p> </blockquote> <p>I am probably missing something but I find Docker very complex. It&#39;s probably super easy after you already know it.</p></pre>SeerUD: <pre><p>Haha, you&#39;re probably right - I&#39;d definitely recommend learning about Docker though, because it really is a game-changer.</p></pre>metamatic: <pre><p>IBM Bluemix <a href="https://www.ibm.com/blogs/bluemix/2015/10/getting-started-with-golang-on-bluemix/" rel="nofollow">supports Go</a>, offers <a href="https://console.bluemix.net/docs/services/PostgreSQL/index.html" rel="nofollow">PostgreSQL</a>, and <a href="https://www.ibm.com/cloud-computing/bluemix/pricing" rel="nofollow">has a free tier</a>. It&#39;s built on Cloud Foundry, so you can just <code>cf push</code> your application to deploy it.</p> <p>Disclaimer: I work for IBM. But I&#39;ve had an application deployed for months and not had to pay anything yet, because of Go&#39;s low resource requirements.</p></pre>NikkoTheGreeko: <pre><p>Linode. Setup a Debian instance, install PostgreSQL and Go 1.8. Done.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

993 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传