Sign inSign up

vactory/drone

By vactory

•Updated 5 months ago

A containerized Enterprise Edition drone-server built with nolimits

Image
0

303

vactory/drone repository overview

⁠A containerized drone-server with nolimits

This project builds and pushes vactory/drone, a containerized Enterprise Edition drone-server built with nolimits, to Docker Hub.

⁠Why ?

The drone/drone⁠ container image you pull from Docker Hub is the Enterprise Edition and without a license is free for a trial period of 5000 builds after which you will need to obtain a license via their website⁠.

As per https://docs.drone.io/enterprise/#what-is-the-difference-between-open-source-and-enterprise⁠, the Drone Enterprise Edition is free for organizations with under $1 million US dollars in annual gross revenue and less than $5 million in debt or equity funding.

You can build the Enterprise Edition as well as the severely limited Open Source Edition -- The two can be compared here⁠. -- from source using the build tags described here⁠.

This project builds and containerized the Enterprise Edition with nolimits so you can use it for free, if you or your organization falls within the requirements of the license⁠.

⁠How do I use the vactory/drone⁠ container image?

Here's an example docker-compose.yml file using this container image integrated with Bitbucket Cloud.

version: "2"
services:
    drone-postgresql:
        image:
            sameersbn/postgresql:10-2
        restart: always
        environment:
            - DB_NAME=drone
            - DB_USER=drone
            - DB_PASS=password
            - DB_EXTENSION=pg_trgm
        ports:
            - "5432"
        volumes:
            - ./volumes/drone-postgresql/var/lib/postgresql:/var/lib/postgresql:Z

    drone-runner-docker:
        image:
           drone/drone-runner-docker:1.4.0
        restart: always
        environment:
           - DRONE_RPC_PROTOCOL=http
           - DRONE_RPC_HOST=drone-server
           - DRONE_RPC_SECRET=shared_secret
           - DRONE_RUNNER_CAPACITY=1
           - DRONE_DEBUG_PRETTY=true
           - DRONE_LOGS_DEBUG=true
        ulimits:
           nofile:
              soft: "262144"
              hard: "262144" 
        ports:
            - "3000"
        volumes:
           - /var/run/docker.sock:/var/run/docker.sock
        depends_on:
           - drone-server

    drone-server:
        image:
            vactory/drone:latest
        restart: always
        environment:
            - DRONE_DATABASE_DRIVER=postgres
            - DRONE_DATABASE_DATASOURCE=postgres://drone:password@drone-postgresql:5432/drone?sslmode=disable
            - DRONE_BITBUCKET_CLIENT_ID=OAUTH_CLIENT_ID
            - DRONE_BITBUCKET_CLIENT_SECRET=OAUTH_CLIENT_SECRET
            - DRONE_RPC_SECRET=shared_secret
            - DRONE_SERVER_HOST=localhost
            - DRONE_SERVER_PROTO=http
            - DRONE_AGENTS_ENABLED=true
            - DRONE_TLS_AUTOCERT=false
            - DRONE_LOGS_PRETTY=true
            - DRONE_LOGS_COLOR=true
            - DRONE_USER_CREATE=username:root,admin:true
            <!-- - DRONE_DATABASE_DRIVER=sqlite3 -->
            <!-- - DRONE_DATABASE_DATASOURCE=/data/database.sqlite -->
        ulimits:
          nofile:
            soft: "262144"
            hard: "262144"
        ports:
            - 80:80
        depends_on:
            - drone-postgresql

You will need to modify the above following Drone's Bitbucket integration documentation⁠.

Then provided you have docker and docker-compose installed, spin up Drone

docker-compose up -d

To scale to 10 runners simply enter into the cli

docker-compose up -d --scale drone-runner-docker=10

⁠Build Image

docker build . -t vactory/drone:latest
docker build . -t vactory/drone:1.0.0
docker login
docker push vactory/drone:latest
docker push vactory/drone:1.0.0

Tag summary

Content type

Image

Digest

sha256:1a8e64819…

Size

24.7 MB

Last updated

almost 4 years ago

docker pull vactory/drone