Gitea Drone Code Hosting and Pipeline Deployment
Prerequisites
- Linux Centos 8
- Docker
- Docker-Compose
- Nginx
- Relevant domain SSL For example https://git.xxx.com, https://drone.xxx.com
Installing Gitea
Refer to https://docs.gitea.com/category/installation
Create a container folder for Gitea
Create a new docker-compose.yml file
Start Gitea
Configure nginx
Restart nginx
Visit git.xxx.com
Proceed with necessary settings and create an admin account
Configure app.ini
Modify according to your needs
After configuring, restart the container
Installing Drone CI/CD
Refer to https://docs.drone.io/
Create a container folder for Drone
Generate a communication key for drone server and drone runner
Create an OAuth2 application in Gitea
Save the obtained Client ID and Client Secret for the next step
Create a new docker-compose.yml file
Start Drone
Configure nginx
Restart nginx
Visit drone.xxx.com
Log in and authorize
Rapid Front-end Application Packaging and Deployment
Activate the drone deployment repository
Open drone.xxx.com, then open your front-end project, click Settings and then Activate Repository to create
Configure the drone deployment repository
Make sure to turn on trusted, to cache node_modules you need to mount the system disk
Add secrets to the drone deployment repository
Configure the server IP and server SSH access password
Add a drone deployment repository configuration file
Write .drone.yml
in the root directory of the local front-end project and push it to the git repository