Code Monkey home page Code Monkey logo

drone-stack's Introduction

Drone CI as Docker Stack (in Swarm mode)

Example setup of Drone CI in a Docker Stack using Swarm mode.

Usage

Simplest usage is by running the deploy.sh script after configuring the agent and server settings:

git clone https://github.com/gesellix/drone-stack
cd drone-stack
vi .server-env
vi .agent-env
./deploy.sh

The script prepares a Docker volume for the Drone server's database and initializes your Docker engine in Swarm mode. Via docker stack deploy the complete stack with server and agents will be deployed to your Docker engine.

The Drone CLI is also available as Docker image and can be used like this:

docker run --rm -it -e DRONE_SERVER=http://example.com:8000 -e DRONE_TOKEN=foo.bar.baz drone/cli info

Security notice about credentials/tokens

Beware that your secrets are saved in .agent-env and .server-env. After drone/#2223 being implemented, both files (or parts of them) should be converted to Docker secrets.

GitHub integration

For the GitHub integration you'll need to create an OAuth App at https://github.com/settings/developers. The Homepage URL should point to your Drone server (e.g. http://example.com:8000), the Authorization callback URL should append /authorize (e.g. http://example.com:8000/authorize).

Due to the initial OAuth flow, the Drone CI server needs to be publicly available at example.com:8000.

Contribution and feedback

Feel free to file an issue or create a pull request if you have questions or if you'd like to improve this example setup!

drone-stack's People

Contributors

gesellix avatar

Watchers

James Cloos avatar Andre Schade avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.