Using Drone-runner-docker in your already configured environment!

In this Article, just an Update of the article Quick Drone Install with SSL, we will add Drone-runner-docker to the installation and thus having a complete environment to start your CI Pipelines:

version: '3.8'
services:
  drone-server:
    image: drone/drone:latest
    container_name: drone
    volumes:
        - CHANGE_ME:/var/lib/drone/
        - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    environment:
        - DRONE_DEBUG=true
        - DRONE_LOGS_TRACE=true
        - DRONE_ORGS=CHANGE_ME
        - DRONE_RUNNER_CAPACITY=20
        - DRONE_AGENTS_ENABLED=true
        - DRONE_GITHUB_SERVER=https://github.com
        - DRONE_GITHUB_CLIENT_ID=CHANGE_ME
        - DRONE_GITHUB_CLIENT_SECRET=CHANGE_ME
        - DRONE_USER_CREATE=CHANGE_ME
        - DRONE_RPC_SECRET=CHANGE_ME
        - DRONE_OPEN=false
        - DRONE_GITHUB=true
        - DRONE_ADMIN_ALL=false
        - DRONE_SERVER_HOST=drone.vinicima.com #CHANGE_ME
        - DRONE_SERVER_PROTO=http
        - DRONE_CONVERT_MULTI=false
  npm:
    image: jc21/nginx-proxy-manager:latest
    container_name: npm
    ports:
        - 80:80
        - 443:443
        - 81:81
    environment:
        - X_FRAME_OPTIONS="sameorigin"
    volumes:
        - CHANGE_ME:/data
        - CHANGE_ME:/etc/letsencrypt
        - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
  drone-agent:
    image: drone/drone-runner-docker:latest
    container_name: drone-docker-runner
    dns:
        - 192.168.250.19
    networks:
        dmz:
            ipv4_address: 192.168.250.227
    volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - /etc/localtime:/etc/localtime:ro
    environment:
        - DRONE_RPC_PROTO=https
        - DRONE_RPC_HOST=drone.vinicima.com #CHANGE_ME
        - DRONE_RUNNER_CAPACITY=20
        - DRONE_RPC_SECRET=CHANGE_ME
        - DRONE_DEFER_TAIL_LOG=true
        - DRONE_DEBUG=true
        - DRONE_RUNNER_NAME=drone-runner.vinicima.com#CHANGE_ME

Run docker-compose:

#docker-compose up -d

That’s all! your environment will be complete to start your CI pipelines.

1 Like