www/content/docs/adyxax.org/git.md

45 lines
1.3 KiB
Markdown
Raw Normal View History

2020-11-29 16:08:17 +01:00
---
title: "git"
2021-03-23 17:01:38 +01:00
description: adyxax.org git server
2020-11-29 16:08:17 +01:00
---
2021-03-23 17:01:38 +01:00
## Introduction
git.adyxax.org is a [gitea](https://gitea.io/) instance. For about 10 years I used a gitolite installation but I finally went for a gui instead in order to host repositories for non tech people.
2020-11-29 16:08:17 +01:00
## Preparing the postgresql database
2021-03-23 17:01:38 +01:00
I am currently hosting this instance on an OpenBSD server. Obviously postgresql is packaged on this system so the installation is as simple as :
2020-11-29 16:08:17 +01:00
{{< highlight sh >}}
pkg_add postgresql-server
su - __postgresql
mkdir /var/postgresql/data
initdb -D /var/postgresql/data -U postgres -A scram-sha-256 -E UTF8 -W
2021-03-23 17:01:38 +01:00
exit
2020-11-29 16:08:17 +01:00
rcctl enable postgresql
rcctl start postgresql
su - ___postgresql
psql -U postgresql
CREATE ROLE gitea WITH LOGIN PASSWORD 'XXXXX';
CREATE DATABASE gitea WITH OWNER gitea TEMPLATE template0 ENCODING UTF8 LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';
{{< /highlight >}}
Since it is OpenBSD the defaults are secure for a local usage, therefore no other configuration is necessary.
## Installing gitea
Gitea is packaged on OpenBSD so the installation is as simple as :
{{< highlight sh >}}
pkg_add gitea
nvim /etc/gitea/app.ini
rcctl enable gitea
rcctl start gitea
{{< /highlight >}}
2021-03-23 17:01:38 +01:00
## Serving the website
2020-11-29 16:08:17 +01:00
2021-03-23 17:01:38 +01:00
TODO
2020-11-29 16:08:17 +01:00
{{< highlight sh >}}
nvim /etc/h2o/h2o.conf
{{< /highlight >}}