commit 6b48e933ceed1370a822ed9fb52dc7132f5669b9 Author: Yohann D'ANELLO Date: Wed Nov 4 17:47:18 2020 +0100 Drone is watching you diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe662ac --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +data/ + +.env diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..06f9bd9 --- /dev/null +++ b/docker-compose.yml @@ -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 diff --git a/env.example b/env.example new file mode 100644 index 0000000..4a77906 --- /dev/null +++ b/env.example @@ -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