Initial commit: working drone installation
commit
b2000af0b1
@ -0,0 +1,55 @@
|
||||
version: '3.6'
|
||||
services:
|
||||
drone:
|
||||
container_name: drone
|
||||
image: drone/drone:${DRONE_VERSION:-1.6.4}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# https://docs.drone.io/server/provider/gitea/
|
||||
- DRONE_DATABASE_DRIVER=sqlite3
|
||||
- DRONE_DATABASE_DATASOURCE=/data/database.sqlite
|
||||
- DRONE_GITEA_SERVER=https://code.ndumas.com
|
||||
- DRONE_GIT_ALWAYS_AUTH=false
|
||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||
- DRONE_SERVER_PROTO=https
|
||||
- DRONE_SERVER_HOST=drone.ndumas.com
|
||||
- DRONE_TLS_AUTOCERT=false
|
||||
- DRONE_USER_CREATE=${DRONE_USER_CREATE}
|
||||
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
|
||||
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
|
||||
ports:
|
||||
- "3001:80"
|
||||
- "3002:443"
|
||||
networks:
|
||||
- cicd_net
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./drone:/data:z
|
||||
|
||||
drone-runner:
|
||||
container_name: drone-runner
|
||||
image: drone/drone-runner-docker:${DRONE_RUNNER_VERSION:-1}
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- drone
|
||||
environment:
|
||||
# https://docs.drone.io/runner/docker/installation/linux/
|
||||
# https://docs.drone.io/server/metrics/
|
||||
- DRONE_RPC_PROTO=https
|
||||
- DRONE_RPC_HOST=drone.ndumas.com
|
||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||
- DRONE_RUNNER_NAME="${HOSTNAME}-runner"
|
||||
- DRONE_RUNNER_CAPACITY=2
|
||||
- DRONE_RUNNER_NETWORKS=cicd_net
|
||||
- DRONE_DEBUG=false
|
||||
- DRONE_TRACE=false
|
||||
ports:
|
||||
- "3000:3000"
|
||||
networks:
|
||||
- cicd_net
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
networks:
|
||||
cicd_net:
|
||||
name: cicd_net
|
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export HOSTNAME=$(hostname)
|
||||
export DRONE_VERSION=2.16.0
|
||||
export DRONE_RUNNER_VERSION=1.8.3
|
||||
export GITEA_ADMIN_USER="admin"
|
||||
export DRONE_RPC_SECRET="$(echo ${HOSTNAME} | openssl dgst -md5 -hex)"
|
||||
export DRONE_USER_CREATE="username:${GITEA_ADMIN_USER},machine:false,admin:true,token:${DRONE_RPC_SECRET}"
|
||||
docker-compose -f docker-compose/drone.yml up -d
|
Loading…
Reference in New Issue