diff options
Diffstat (limited to 'Bastillefile')
-rw-r--r-- | Bastillefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Bastillefile b/Bastillefile new file mode 100644 index 0000000..9de5654 --- /dev/null +++ b/Bastillefile @@ -0,0 +1,26 @@ +# Simple Gitea installation for the Macon + +# Overlay usr/local/etc/gitea/conf/app.ini, which configures Gitea +OVERLAY usr + +# Prepare a mount point and mount the host's gitea data. This is the user +# database and git repositories. +CMD mkdir -p /var/db/gitea && echo Created dir /var/db/gitea +CMD mkdir -p /var/git && echo Created dir /var/git +FSTAB /zroot/gitea /var/db/gitea nullfs rw 0 0 +FSTAB /zroot/git /var/git nullfs rw 0 0 + +# Create a git user for Gitea. *Must* be the same UID that owns the data mount. +CMD pw useradd -n git -m -u 210 && echo Created user "git" + +# Install Gitea +PKG gitea + +# Generate all secrets Gitea needs to run and insert them into the config file. +CMD sed -i .bak "s/^JWT_SECRET.*=.*$/JWT_SECRET = $(gitea generate secret JWT_SECRET)/g" /usr/local/etc/gitea/conf/app.ini +CMD sed -i .bak "s/^INTERNAL_TOKEN.*=.*$/INTERNAL_TOKEN = $(gitea generate secret INTERNAL_TOKEN)/g" /usr/local/etc/gitea/conf/app.ini +CMD sed -i .bak "s/^SECRET_KEY.*=.*$/SECRET_KEY = $(gitea generate secret SECRET_KEY)/g" /usr/local/etc/gitea/conf/app.ini + +# Enable and start Gitea on 127.0.0.1:3000 +SYSRC gitea_enable=YES +SERVICE gitea start |