

Deploy your Go apps on dotCloud - KenCochrane
http://blog.dotcloud.com/go-on-dotcloud

======
KenCochrane
For those of you who want to see the source code, here is a link to the github
repo. Feel free to fork, and do what you like to make it better for you.
<https://github.com/kencochrane/golang-on-dotcloud>

~~~
BarkMore
Why do you build in the server instead of cross compiling on the client and
pushing a binary? Cross compiling will allow developers to use GOPATH instead
collecting all dependencies in a directory tree for upload dotCloud.

~~~
jpetazzo
Compiling Go code is super easy; but how easy it is to cross-compile from e.g.
OS X to Linux? Or from Windows to Linux? And would there be an advantage over
the current situation? (This is a genuinely naive question; I'm fairly new to
Go!)

~~~
NateDad
Cross compiling is easy. Follow the steps here:
[http://dave.cheney.net/2012/09/08/an-introduction-to-
cross-c...](http://dave.cheney.net/2012/09/08/an-introduction-to-cross-
compilation-with-go)

You can compile from any OS, for any OS. I compile for 32 and 64 bit versions
of Windows, OSX, and Linux for my applications. It takes about 5 seconds for
all the builds (running serially) to complete.

[edit] Bah, beat by shykes. It's still not hard.

------
andymoe
Nice. I have not tried dotcloud since it first came out and the command line
and docs were just not ready for prime time.

I have to say things are hugely improved since then and at least on par with
Heroku and with much more fine grained control over costs. Great work!

~~~
KenCochrane
Thank you. I hope you get a chance to check it out. It is FREE to use, and
what ever comments you have good or bad, we would love to hear them.

~~~
bitcartel
Price is not an issue. Vendor lock-in is.

I would try out DotCloud if it were an open-source PAAS like OpenShift or
CloudFoundry.

~~~
andymoe
Would you say Heroku is big on the vendor lock in too? If you stay away from
the ad-ons they are really mostly just running some code and maintaining a
standard database unlike say Google App Engine. I don't see how moving to say
EC2 or your own servers is really that much work on the grand scale of things
and I have done a fair number of data center moves and server migrations etc.

------
melvinmt
> I was sad to find out that there were not many options for hosting Go
> applications. It seems you could run your own server (VPS, etc) or you could
> deploy to Google App Engine.

Heroku also supports Go: <https://gist.github.com/299535bbf56bf3016cba>

~~~
KenCochrane
Thanks, I didn't see it listed on their site anywhere.

------
KenCochrane
I'm still new to Go, so I'm sure there are ways to make this much better, so
if you have any suggestions, please let me know. This was done during a hack
day, so I know there are improvements that can be made.

------
voidlogic
Do they allow use of the "unsafe" package?

~~~
shykes
Yes, you are free to crash your app any way you see fit :)

dotCloud sandboxes applications with kernel containers, so you can run any
userland process you want.

~~~
voidlogic
Fantastic! One man's crashing app is another (more capable man's) special
(dirty) function that makes his tight core loop 60% faster ;)

