| 
				
					
						 | 
			||
|---|---|---|
| .env | ||
| .gitignore | ||
| README.md | ||
| act-runner.service | ||
| git.conf | ||
| prepare.sh | ||
| setup_act_runner.sh | ||
| setup_nginx.sh | ||
| stack.yaml | ||
		
			
				
				README.md
			
		
		
			
			
		
	
	Prerequisites
Before you begin, you will need:
- A server running Ubuntu 18.04 or later
 sudoprivileges- An internet connection
 
Steps
- Update the repository cache:
 
sudo apt update
- Install the necessary packages:
 
sudo apt install -y nginx-light certbot python3-certbot-nginx docker.io
- Add the current user to the 
dockergroup and switch to this group: 
sudo usermod -a -G docker $USER newgrp docker
- Initialize Docker Swarm mode if it has not yet been initialized:
 
docker swarm init || true
- Deploy the Gitea application using Docker Swarm:
 
docker stack deploy -c stack.yaml gitea
Note: The stack.yaml file contains the configuration for the Gitea application, including the Docker image to use, the ports to expose, and any environment variables to set.
- Change 
GITEA_HOSTNAMEandEMAILinside.envfile to your own values and then runsetup_nginx.shscript: 
bash setup_nginx.sh
It will generate nginx config and issue ssl certificate for your Gitea.
- 
After that you can go to
$GITEA_HOSTNAMEURL and finish the installstion. At the bottom of install page, don't forget to create an administrator account. - 
Go to
$GITEA_HOSTNAME/admin/runners, pressCreate new runnerbutton, copy registration token from there and incert it into.envfile asGITEA_TOKENparameter. - 
Run
setup_act_runnerscript, which will install CI agent to your node. You will se it on$GITEA_HOSTNAME/admin/runnerspage.