fly-apps/drone
2023-11-22 14:24:23 -05:00
..
Dockerfile initial import of https://git.mat.services/mat/fly-apps 2023-10-17 16:36:25 -04:00
fly.toml updates 2023-11-22 14:24:23 -05:00
README.md updates 2023-11-22 14:24:23 -05:00

Drone, the builder for Forgejo

This deploys Drone.io, CI builder for Forgejo (was Gitea).

Installation

  1. Clone this repository
  2. fly launch, follow the prompts
  3. Select n when it asks if you want to deploy
  4. Setup the admin user account:
    fly secrets set "DRONE_USER_CREATE=username:greg,machine:false,admin:true,token:=$(openssl rand -hex 16)"
    
  5. Check that the user filter DRONE_USER_FILTER = "greg" matches your username above.
  6. Also consider setting the repository filter if needed
  7. Generate, and store securely, you secrets:
    fly secrets set "DRONE_RPC_SECRET=$(openssl rand -hex 16)"
    
  8. storage you'll need to add two more secrets:
    fly secrets set \
      "DRONE_GITEA_CLIENT_ID=[redacted]" \
      "DRONE_GITEA_CLIENT_SECRET=[redacted]"
    
  9. Deploy, fly deploy --remote-only
  10. Setup DNS with your registrar, you must have either CNAME or A/AAAA records set. See: https://fly.io/docs/app-guides/custom-domains-with-fly/
  11. Create certificate for Fly's automatic TLS termination. fly certs create build.example.com

Final Step

  1. Delete the Docker Engine from your local system.
  2. You probably want to scale your remote Daemon: fly scale vm dedicated-cpu-2x and fly scale memory 2048
docker run --detach \
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  --env=DRONE_RPC_PROTO=https \
  --env=DRONE_RPC_HOST=build.burd.me \
  --env=DRONE_RPC_SECRET=70619c6241d757e8935c9a7d \
  --env=DRONE_RUNNER_CAPACITY=2 \
  --env=DRONE_RUNNER_NAME=my-laptop-runner \
  --publish=3000:3000 \
  --name=runner \
  drone/drone-runner-docker:1

--restart=always \

NOTES: