Scripts and instructions how to deploy Gitea and Gitea Actions
Go to file
digitalstudium 8107aba26f Update 'git.conf' 2023-05-14 13:49:36 +00:00
.env first commit 2023-03-25 12:07:14 +00:00
.gitignore first commit 2023-03-25 12:07:14 +00:00
README.md Update 'README.md' 2023-04-02 17:32:06 +00:00
act-runner.service first commit 2023-03-25 12:07:14 +00:00
git.conf Update 'git.conf' 2023-05-14 13:49:36 +00:00
prepare.sh Fix setup nginx script 2023-03-25 14:49:36 +00:00
setup_act_runner.sh Update 'setup_act_runner.sh' 2023-05-14 05:47:27 +00:00
setup_nginx.sh Fix setup nginx script 2023-03-25 14:49:36 +00:00
stack.yaml Fix ssh port 2023-03-25 14:23:28 +00:00

README.md

Prerequisites

Before you begin, you will need:

  • A server running Ubuntu 18.04 or later
  • sudo privileges
  • An internet connection

Steps

  1. Update the repository cache:

sudo apt update

  1. Install the necessary packages:

sudo apt install -y nginx-light certbot python3-certbot-nginx docker.io

  1. Add the current user to the docker group and switch to this group:

sudo usermod -a -G docker $USER && newgrp docker

  1. Initialize Docker Swarm mode if it has not yet been initialized:

docker swarm init || true

  1. 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.

  1. Change GITEA_HOSTNAME and EMAIL inside .env file to your own values and then run setup_nginx.sh script:

bash setup_nginx.sh

It will generate nginx config and issue ssl certificate for your Gitea.

  1. After that you can go to $GITEA_HOSTNAME URL and finish the installstion. At the bottom of install page, don't forget to create an administrator account.

  2. Go to $GITEA_HOSTNAME/admin/runners, press Create new runner button, copy registration token from there and incert it into .env file as GITEA_TOKEN parameter.

  3. Run setup_act_runner script, which will install CI agent to your node. You will se it on $GITEA_HOSTNAME/admin/runners page.