Skip to content

Instantly share code, notes, and snippets.

@tiero
Last active September 13, 2018 20:53
Show Gist options
  • Save tiero/6e29b6b81a1eec9ea3e224b83f7c3d81 to your computer and use it in GitHub Desktop.
Save tiero/6e29b6b81a1eec9ea3e224b83f7c3d81 to your computer and use it in GitHub Desktop.
Install Drone.io CLI on Ubuntu 16
#!/bin/sh
# Update & Upgrade the System
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential
#Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
#Docker Compose
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Install drone.io image
sudo docker pull drone/drone:0.8
echo "version: '2'
services:
drone-server:
image: drone/drone:0.8
ports:
- 80:8000
- 9000
volumes:
- drone-server-data:/var/lib/drone/
restart: always
environment:
- DRONE_OPEN=true
- DRONE_ORGS=<GITHUB_ORGANIZATION>
- DRONE_ADMIN=<GITHUB_USERNAMES>
- DRONE_HOST=<SERVER_HOST>
- DRONE_GITHUB=true
- DRONE_GITHUB_CLIENT=<GITHUB_CLIENT>
- DRONE_GITHUB_SECRET=<GITHUB_SECRET>
- DRONE_SECRET=<DRONE_ROOT_SECRET>
drone-agent:
image: drone/agent:0.8
command: agent
restart: always
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SERVER=drone-server:9000
- DRONE_SECRET=<DRONE_ROOT_SECRET>
volumes:
drone-server-data:" > docker-compose.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment