miniserver/README.md
2024-03-12 22:52:38 +03:00

31 lines
1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Порезанная версия сервиса gitrepo
## Установка
1. Ставим на серваке Docker (https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)
2. Копируем все файлы на сервер
3. Редактируем файл .env под себя и указываем правильный домен в файле etc/Caddyfile
3. Выполняем в директории с файлами команду
```
docker compose up -d
```
4. Настраиваем SSH:
```
adduser \
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \
--group \
--disabled-password \
--home /home/git \
git
```
5. Добавляем в /etc/ssh/sshd_config
```
Match User git
AuthorizedKeysCommandUser git
AuthorizedKeysCommand /usr/bin/docker exec -i git /usr/local/bin/forgejo keys -e git -u %u -t %t -k %k
PasswordAuthentication no
```
## Если не завелось
1. Смотрим статус сервисов -