Prerequisites:
- Ansible
- Ubuntu 16.04 server & ssh access to that server
Installation steps:
- Update server ip in
hostsfile. If you are planning to use same server for both drone and nginx - just put same ip for both, drone & nginx targets. - Install Ansible role dependencies with one command:
./bin/install-ansible-dependencies.sh - Update github application callback url to either point to your server ip address or your domain. For example:
http://ci.myapp.com/loginor justhttp://server_ip/login. - Set server ip variable or domain name in
vars/main.yml(nginx_drone_server_namevariable). - Update
drone_user_createinvars/main.yml- github user, who will be initial administrator and will be able to grant the administrator role to additional accounts. - Rename
credentials-template.ymlintocredentials.ymland update your github clientId, clientSecret as well as username and password for PostgreSQL database.
Once you done all above, run the following command:
./bin/setup-server.sh && ./bin/deploy-drone.sh
You should have Drone CI installed by now. The only step remaining is to make Drone work behind Nginx proxy.
If you would like to install nginx on a same server with Drone CI - just run following command:
./bin/setup-nginx.sh
If you already have nginx installed somewhere else and just would like to attach drone nginx configuration to existing nginx server you can do following:
- Set nginx server ip in
hostsfile for the nginx target - Run same command
./bin/setup-nginx.sh, but replynoto the question about nginx installation.
In this case nginx configuration for Drone CI will be copied to the existing nginx server.
- Place your ssl keys into int ssl-keys directory as app.crt and app.key (they are in a
.gitignore) - Make sure that
server_setup_sslis set to true invars/main.yml - Deploy ssl using
./bin/setup-server.sh --tags "nginx" - Update callback url in the Github application to start from
https
Thanks goes to these wonderful people (emoji key):
Mar1nka 💻 |
arlovaalina 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
