Although there is only a 60-day trial period, I will publish the tutorial: 1. Register a Cloudfoundry account https://console.run.pivotal.io/register2. Install CLI Deployment Kit http://docs.run.pivotal.io/starting/index.html#install-login3. Download INDEX.GO:HTTPS://GITHUB.COM/PHUSLU/GOPROXY/TREE/MASTER/FETCHSERVER/PHP4. Access URL: https://github.com/freeformz/go-heroku-example godeps,message,worker,profile these files separately. Open the CMD window and run the following command in turn, MD CLOUDFOUNDRYCD Cloudfoundry then put index.go,godeps,message,worker,profile these folders, files into the Cloudfoundry directory. Continue running: CF login-a Https://api.run.pivotal.ioemail:[email protected]password:???????? Authenticating ... OK account Verification Pass: will let you choose Workspace, directly select 1 "development" CF push AppName//appname casually named the following information is described in the deployment success: as the user XXXX Update organization garyyuan/space in XXXX should be Use the program appname ... By uploading the application appname ... Upload application files from: E:\cloudfoundry upload 7.9K, 10 file done uploading through as user xxxxxx Stop organization xxxxx in/space XXXX application appname ... By launching the application as a user xxxxxx in the organization garyyuan/space xxxxx appname ...-----> Downloaded App package (8.0K)-------> Buildpack version 1.5.0-----> Checking godeps/godeps.json file.-----> Installing go1.4.2 ... Done-----> RUNNING:GODEP Go install-tags cloudfoundry./...-----> Uploading droplet (2.3M) 1 of 1 instances running application started via AP P xxxx is started using this command ' go-heroku-example ' as user XXXX display organization xxxx/space XXXXXX application appname health State ... By request Status: Started instance: 1/1 usage: 1G times 1 Instances URL: Appname.cfapps.iopackage Uploaded:sun 2 10:02:20 UTC 2015stack:cflinuxfs2bui Ldpack:go status from CPU kernel memory disk details#0 run 2015-08-02 06:02:55 PM 0% 7.7M deployment in 3.4M 1G in 1G was successful! PHP URL: Http://appname.cfapps.io Verify that the browser input: Http://appname.cfapps.io, the following message appears, indicating that the deployment was successful. 404 Not found:requested route (' Phuslu-915295030.cfapps.io ') does not exist. Finally put Http://appname.cfapps.io into Php.json, enjoy!
Cloudfoundry on the Go server