service-drone-server/README.md

46 lines
1.2 KiB
Markdown
Raw Normal View History

2022-08-18 15:42:46 +00:00
# Drone Server
2022-08-18 15:31:05 +00:00
## Setup on Dokku
2022-08-18 15:42:46 +00:00
Create APP
2022-08-18 15:31:05 +00:00
dokku apps:create cicd
2022-08-18 15:42:46 +00:00
Setup Network & Domains
dokku network:create cicd_net
dokku network:set cicd initial-network cicd_net
2022-08-18 17:31:35 +00:00
dokku config:set --no-restart cicd DOKKU_LETSENCRYPT_EMAIL=username@example.com
2022-08-18 15:42:46 +00:00
2022-08-18 17:31:35 +00:00
Setup Database
dokku postgres:create cicd
dokku postgres:link cicd cicd
Setup Volumes
dokku storage:mount cicd /home/data/cicd.drone:/data
2022-08-18 15:42:46 +00:00
Setup Configuration
2022-08-18 17:31:35 +00:00
dokku config:set cicd DRONE_DATABASE_DRIVER=postgres
dokku config:set cicd DRONE_GIT_ALWAYS_AUTH=false
dokku config:set cicd DRONE_GITEA_SERVER=https://gitea.example.com
dokku config:set cicd DRONE_SERVER_HOST=cicd.example.com
dokku config:set cicd DRONE_SERVER_PROTO=https
2022-08-18 15:31:05 +00:00
dokku config:set cicd DRONE_TLS_AUTOCERT=false
2022-08-18 17:31:35 +00:00
Setup Secrets
dokku config:set cicd DRONE_COOKIE_SECRET=$(openssl rand -hex 16)
dokku config:set cicd DRONE_RPC_SECRET=$(openssl rand -hex 16)
dokku config:set cicd DRONE_GITEA_CLIENT_ID=FIXME
dokku config:set cicd DRONE_GITEA_CLIENT_SECRET=FIXME
2023-09-11 12:01:10 +00:00
dokku config:set cicd DRONE_USER_CREATE=username:admin,machine:false,admin:true,token:$(openssl rand -hex 16)
2022-08-18 15:42:46 +00:00
Deploy
2022-08-18 17:33:00 +00:00
git remote add dokku dokku@dokku.example.com:cicd
2022-08-18 18:39:22 +00:00
git push dokku master
2022-08-18 15:31:05 +00:00