A
A
Askar Fuzaylov2016-09-28 16:06:51
go
Askar Fuzaylov, 2016-09-28 16:06:51

How to properly deploy a Go application to a server?

Hello.
Wrote a small web service. Now you need to deploy to the server and run.
I can't find information online on how to do this.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jewubinin, 2016-10-08
@jewubinin

You have a pointless question. After all, it depends on what is on the server.
If you are using Google AppEngine for Go, then this is done, for example:
https://cloud.google.com/appengine/docs/go/quickstart
In the Cloud Platform Console, go to the Projects page and select or create a new project.
Go to the Projects page
Note the project ID that you created above.
Upload your application to Google App Engine by invoking the following command. This opens a browser window for you to sign in using your Google account. You'll be providing the project ID as the argument for -A. Use the -V argument to specify a version name.
appcfg.py -A -V v1 update myapp/
Your app is now deployed and ready to serve traffic athttp://appspot.com/.
Well, in general, a Go program is ultimately an ordinary binary.
Upload it to the server in
any way. Run it on the server in any way.
This is a full-fledged binary file, which for execution is one of the advantages of Go's design.

P
Philipp, 2016-09-28
@zoonman

1. Build a binary for the desired platform.
2. Copy it to the server in any way.
3. Restart.
There are many solutions. Any CI will do. One of the trendy ways . Old school .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question