From 45dcf8f2b9b3048eff74a184ea50cb083c7efd0b Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 10 Nov 2021 16:10:54 +0100 Subject: Move git docs to a dedicated section --- content/docs/adyxax.org/git.md | 48 ----------------------------------- content/docs/adyxax.org/git/_index.md | 48 +++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 content/docs/adyxax.org/git.md create mode 100644 content/docs/adyxax.org/git/_index.md diff --git a/content/docs/adyxax.org/git.md b/content/docs/adyxax.org/git.md deleted file mode 100644 index 3d8563b..0000000 --- a/content/docs/adyxax.org/git.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: "git" -description: adyxax.org git server ---- - -## 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. - -## Preparing the postgresql database - -I am currently hosting this instance on an OpenBSD server. Obviously postgresql is packaged on this system so the installation is as simple as : -{{< 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 -{{< /highlight >}} - -At this point you have to specify the postgres user password. Once done, exit the _postgresql users' shell and run as root : - -{{< highlight sh >}} -rcctl enable postgresql -rcctl start postgresql -su - _postgresql -psql -U postgres -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 >}} - -## Serving the website - -TODO -{{< highlight sh >}} -nvim /etc/h2o/h2o.conf -{{< /highlight >}} diff --git a/content/docs/adyxax.org/git/_index.md b/content/docs/adyxax.org/git/_index.md new file mode 100644 index 0000000..3d8563b --- /dev/null +++ b/content/docs/adyxax.org/git/_index.md @@ -0,0 +1,48 @@ +--- +title: "git" +description: adyxax.org git server +--- + +## 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. + +## Preparing the postgresql database + +I am currently hosting this instance on an OpenBSD server. Obviously postgresql is packaged on this system so the installation is as simple as : +{{< 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 +{{< /highlight >}} + +At this point you have to specify the postgres user password. Once done, exit the _postgresql users' shell and run as root : + +{{< highlight sh >}} +rcctl enable postgresql +rcctl start postgresql +su - _postgresql +psql -U postgres +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 >}} + +## Serving the website + +TODO +{{< highlight sh >}} +nvim /etc/h2o/h2o.conf +{{< /highlight >}} -- cgit v1.2.3