caddy | ||
static | ||
.gitignore | ||
docker-compose.yml | ||
readme.md |
setting up the server
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce docker-ce-cli docker-compose containerd.io
sudo docker run hello-world
create git user for gitea:
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
id git
sudo touch /usr/local/bin/gitea
sudo chmod +x /usr/local/bin/gitea
sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key"
gitea runs as the git
user; the files are in /home/git/gitea/data
.
/usr/local/bin/gitea
contents:
#!/bin/sh
ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"