How to deploy from GitLab CE with CI to DigitalOcean?

September 19, 2016 8.5k views
Git DigitalOcean Deployment Ubuntu 16.04

I am trying to build a basic auto-deployment with GitLab Continous Integration. We are using GitLab Community Edition.

GitLab CI lets us define 'environments' where our code gets deployed to, however I don't know if it is possible to define a remote server as target environment and if yes (as it sounds logical to me) how to grant GitLab access to that address?

I have found tutorials on how to install GitLab on our droplet, but my question is that is it possible to keep our repo on GitLab CE and pushing our code to our droplet using these CI pipelines?

Thanks for the help in advance :)

2 Answers

This post might help. You can deploy to a remote server over ssh with rsync but you have to specify the user and the keyfile so it's available when rsync runs. With this in place, GitLab will be able to deploy to the remote location on your server that you specified using an ssh-key.

Have another answer? Share your knowledge.