From fb5d9d803454d3d2fb15ca1202febdb3b6dff1c2 Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Fri, 1 May 2020 18:57:50 +0200 Subject: [PATCH] Adjustments in gitea recipe --- example/gitea/Fockerfile | 1 + example/gitea/focker-compose.yml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/example/gitea/Fockerfile b/example/gitea/Fockerfile index d980138..efca9a6 100644 --- a/example/gitea/Fockerfile +++ b/example/gitea/Fockerfile @@ -42,3 +42,4 @@ steps: - sysrc sshd_enable=NO - sysrc gitea_enable=YES - sysrc syslogd_flags="-ss" + - sed -i -e 's/DISABLE_REGISTRATION[ \t]*=[ \t]*false/DISABLE_REGISTRATION = true/g' /usr/local/etc/gitea/conf/app.ini diff --git a/example/gitea/focker-compose.yml b/example/gitea/focker-compose.yml index 39f8791..328910b 100644 --- a/example/gitea/focker-compose.yml +++ b/example/gitea/focker-compose.yml @@ -19,7 +19,12 @@ jails: ip4.addr: 127.0.8.1 exec.start: | chown git:git /var/db/gitea && \ - sed -i -e 's/HTTP_ADDR = 127.0.0.1/HTTP_ADDR = 127.0.8.1/g' /usr/local/etc/gitea/conf/app.ini && \ + sed -i -e 's/127.0.0.1/127.0.8.1/g' /usr/local/etc/gitea/conf/app.ini && \ + sed -i -e 's/ChangeMeBeforeRunning/J#NNOWn377ijsmfjmw54594702239ydhofh494j/g' /usr/local/etc/gitea/conf/app.ini && \ + if [ ! -f /var/db/gitea/gitea.db ]; then \ + su git -c 'gitea migrate -c /usr/local/etc/gitea/conf/app.ini' && \ + su git -c 'gitea admin -c /usr/local/etc/gitea/conf/app.ini create-user --username admin1 --password "AdminAdmin1+" --email "invaliduser@nonexistentdomain.com"'; \ + fi && \ /bin/sh /etc/rc certbot-gitea: