Drone is watching you

This commit is contained in:
Yohann D'ANELLO 2020-11-04 17:47:18 +01:00
commit 6b48e933ce
3 changed files with 110 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
data/
.env

100
docker-compose.yml Normal file
View file

@ -0,0 +1,100 @@
version: "3"
services:
drone:
image: drone/drone:1.9.2
restart: always
environment:
# Git user (1000 est réserver pour l'utilisateur Aurore)
- USER_UID=1001
- USER_GID=1001
- DRONE_GITEA_SERVER=https://gitea.auro.re
- "DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}"
- "DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}"
- "DRONE_RPC_SECRET=${DRONE_RPC_SECRET}"
- DRONE_SERVER_HOST=drone.auro.re
- DRONE_SERVER_PROTO=https
- DRONE_DATABASE_DRIVER=postgres
- "DRONE_DATABASE_DATASOURCE=${DRONE_DATABASE_DATASOURCE}"
- "DRONE_DATABASE_SECRET=${DRONE_DATABASE_SECRET}"
- DRONE_USER_CREATE=username:aurore,admin:true
- DRONE_LOGS_TEXT=true
- DRONE_LOGS_PRETTY=true
- DRONE_LOGS_COLOR=true
- DRONE_LOGS_DEBUG=true
volumes:
- /var/local/ansible-docker/docker-drone/data:/data
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "8000:80"
runner-1:
image: drone/drone-runner-docker:1.5.3
restart: always
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone
- "DRONE_RPC_SECRET=${DRONE_RPC_SECRET}"
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=aurore-runner-1
links:
- drone
volumes:
- /var/run/docker.sock:/var/run/docker.sock
runner-2:
image: drone/drone-runner-docker:1.5.3
restart: always
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone
- "DRONE_RPC_SECRET=${DRONE_RPC_SECRET}"
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=aurore-runner-2
links:
- drone
volumes:
- /var/run/docker.sock:/var/run/docker.sock
runner-3:
image: drone/drone-runner-docker:1.5.3
restart: always
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone
- "DRONE_RPC_SECRET=${DRONE_RPC_SECRET}"
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=aurore-runner-3
links:
- drone
volumes:
- /var/run/docker.sock:/var/run/docker.sock
runner-4:
image: drone/drone-runner-docker:1.5.3
restart: always
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone
- "DRONE_RPC_SECRET=${DRONE_RPC_SECRET}"
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=aurore-runner-4
links:
- drone
volumes:
- /var/run/docker.sock:/var/run/docker.sock
runner-5:
image: drone/drone-runner-docker:1.5.3
restart: always
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone
- "DRONE_RPC_SECRET=${DRONE_RPC_SECRET}"
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=aurore-runner-5
links:
- drone
volumes:
- /var/run/docker.sock:/var/run/docker.sock

7
env.example Normal file
View file

@ -0,0 +1,7 @@
# Copy this as .env and make it only readable by root
# Secrets can be generated using openssl rand -hex 16
DRONE_GITEA_CLIENT_ID=CHANGE ME
DRONE_GITEA_CLIENT_SECRET=CHANGE ME
DRONE_RPC_SECRET=CHANGE ME
DRONE_DATABASE_DATASOURCE=postgres://drone:CHANGEME@1.2.3.4:5432/drone?sslmode=disable
DRONE_DATABASE_SECRET=CHANGE ME