summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Bastillefile26
-rw-r--r--usr/local/etc/gitea/conf/app.ini69
2 files changed, 95 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
diff --git a/usr/local/etc/gitea/conf/app.ini b/usr/local/etc/gitea/conf/app.ini
new file mode 100644
index 0000000..ba1af9e
--- /dev/null
+++ b/usr/local/etc/gitea/conf/app.ini
@@ -0,0 +1,69 @@
+APP_NAME = 53hornet's Gitea Repos (Sans Chamomile)
+RUN_USER = git
+RUN_MODE = prod
+
+[database]
+DB_TYPE = sqlite3
+HOST = 127.0.0.1:3306
+NAME = gitea
+PASSWD =
+PATH = /var/db/gitea/gitea.db
+SSL_MODE = disable
+USER = root
+
+[indexer]
+ISSUE_INDEXER_PATH = /var/db/gitea/indexers/issues.bleve
+
+[log]
+ROOT_PATH = /var/log/gitea
+MODE = file
+LEVEL = Info
+
+[mailer]
+ENABLED = false
+
+[oauth2]
+JWT_SECRET =
+
+[picture]
+AVATAR_UPLOAD_PATH = /var/db/gitea/data/avatars
+DISABLE_GRAVATAR = false
+ENABLE_FEDERATED_AVATAR = false
+
+[repository]
+ROOT = /var/git
+# Gitea's default is 'bash', so if you have bash installed, you can comment
+# this out.
+SCRIPT_TYPE = sh
+ENABLE_PUSH_CREATE_USER = true
+DEFAULT_PUSH_CREATE_PRIVATE = true
+
+[repository.upload]
+TEMP_PATH = /var/db/gitea/data/tmp/uploads
+
+[security]
+INSTALL_LOCK = true
+INTERNAL_TOKEN =
+SECRET_KEY =
+
+[session]
+PROVIDER = file
+PROVIDER_CONFIG = /var/db/gitea/data/sessions
+
+[server]
+DOMAIN = localhost
+HTTP_ADDR = 127.0.0.1
+HTTP_PORT = 3000
+ROOT_URL = http://localhost:3000/
+DISABLE_SSH = false
+SSH_DOMAIN = %(DOMAIN)s
+SSH_PORT = 22
+OFFLINE_MODE = false
+APP_DATA_PATH = /var/db/gitea/data
+
+[service]
+REGISTER_EMAIL_CONFIRM = false
+ENABLE_NOTIFY_MAIL = false
+DISABLE_REGISTRATION = true
+ENABLE_CAPTCHA = false
+REQUIRE_SIGNIN_VIEW = false