Merge pull request #16 from BastilleBSD/2025-cleanup

This commit is contained in:
tschettervictor
2025-11-20 07:55:32 -07:00
committed by GitHub
48 changed files with 230 additions and 120 deletions

View File

@@ -1,17 +1,12 @@
# Bastille Combined Templates
# Bastille Templates
## Status - Beta
This repository is a collection of Bastille templates all aggregated into
one place. This means you can add ALL the templates with one command. What's
more, the structure mimicks the FreeBSD ports tree. This means that you should
be able to find a template in a standard location to match any package origin.
Code is being tested to support this new combined method alongside the existing
format. This means you can still use your existing custom templates while also
taking advantage of the new combined collection.
This status will be removed once this new support has been added and merged.
This repository is a collection of Bastille templates all aggregated into one
place. This means you can add ALL the templates with one command. What's more,
the structure mimicks the FreeBSD ports tree. This means that you should be
able to find a template in a standard location to match any package origin.
## Usage
To use templates you must have git installed on your system.
```shell
pkg install git
@@ -22,13 +17,18 @@ pkg install git
bastille bootstrap https://github.com/bastillebsd/templates
```
## Usage
## Bastille Usage
```shell
bastille template TARGET [pkg/origin]
bastille template TARGET [category/port]
```
### Examples
## Rocinante Usage
```shell
rocinante template [category/port]
```
### Bastille Examples
```shell
bastille template TARGET www/nginx
bastille template TARGET shells/zsh
bastille template TARGET lang/python311
@@ -36,3 +36,9 @@ bastille template TARGET databases/mariadb1011-server
...etc...
```
### Rocinante Examples
```shell
rocinante template x11/slim
rocinante template net/openntpd
```

View File

@@ -1,5 +1,5 @@
## influxdb
Bastille Template to bootstrap InfluxDB
Bastille template to bootstrap InfluxDB
## Usage
```shell

View File

@@ -1,15 +1,8 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/percona/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/percona/commits/master)
## percona
Bastille Template: percona
Bastille template: percona
Fetch and apply this template with:
```shell
bastille bootstrap https://gitlab.com/bastillebsd-templates/percona
bastille template TARGET bastillebsd-templates/percona
bastille template TARGET databases/percona
```
## Description
This template installs a percona server and client.

View File

@@ -1,5 +1,5 @@
## unbound
Bastille Template for an Unbound DNS container
Bastille template for an Unbound DNS container
## Usage
```shell

View File

@@ -1,6 +1,3 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/minecraft-server/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/minecraft-server/commits/master)
## minecraft-server
Bastille template for a minecraft server.
@@ -20,7 +17,7 @@ existing on the host system.
To install (or update) `/usr/ports` on the host system use `portsnap` as seen here:
```shell
ishmael ~ # portsnap fetch auto
portsnap fetch auto
```
Note: the ports tree is mounted read-only within the container.
@@ -28,7 +25,7 @@ Note: the ports tree is mounted read-only within the container.
## Apply template
```shell
ishmael ~ # bastille template TARGET bastillebsd-templates/minecraft-server
bastille template TARGET games/minecraft-server
```
## Access server console
@@ -37,7 +34,7 @@ The minecraft server will run in `STANDALONE` mode meaning the service execution
will happen within a `tmux` session. To access this session use this command:
```shell
ishmael ~ # bastille service TARGET minecraft console
bastille service TARGET minecraft console
```
Tip: `tmux` session management is handled using `ctrl-b` prefix. To exit the

View File

@@ -1,11 +1,6 @@
## golang
Bastille template to bootstrap Go 1.20
## Bootstrap
```shell
bastille bootstrap https://github.com/bastillebsd/templates
```
## Usage
```shell
bastille template TARGET lang/go120

1
lang/perl/Bastillefile Normal file
View File

@@ -0,0 +1 @@
PKG perl5-devel

View File

@@ -1 +0,0 @@
perl5-devel

View File

@@ -1,10 +1,7 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/perl/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/perl/commits/master)
## perl
Bastille Template to bootstrap perl5-devel
## Usage
```shell
bastille template TARGET bastillebsd-templates/perl
bastille template TARGET lang/perl
```

View File

@@ -3,5 +3,5 @@ Bastille template to bootstrap PHP
## Usage
```shell
bastille template TARGET bastillebsd-templates/php
bastille template TARGET lang/php
```

1
lang/ruby/Bastillefile Normal file
View File

@@ -0,0 +1 @@
PKG ruby

View File

@@ -1 +0,0 @@
ruby

View File

@@ -1,10 +1,7 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/ruby/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/ruby/commits/master)
## ruby
Bastille template to bootstrap ruby
## Usage
```shell
bastille template TARGET bastillebsd-templates/ruby
bastille template TARGET lang/ruby
```

View File

@@ -1,5 +1,5 @@
# rust
Bastille Template to bootstrap Rust
Bastille template to bootstrap Rust
## Usage
```shell

View File

@@ -1,12 +1,8 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/n8n/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/n8n/commits/master)
## n8n
Bastille Template for a n8n
## Usage
```shell
ishmael ~ # bastille template TARGET bastillebsd-templates/n8n
bastille template TARGET misc/n8n
```

View File

@@ -1,9 +1,7 @@
## Uptime-Kuma
Bastille Template for [Uptime Kuma](https://github.com/louislam/uptime-kuma) a self-hosted monitoring tool
## Usage
```shell
bastille template TARGET bastillebsd-templates/uptime-kuma
bastille template TARGET misc/uptime-kuma
```

View File

@@ -1,8 +1,7 @@
## jellyfin
Bastille Template for Jellyfin
Bastille template for Jellyfin
## Usage
```shell
bastille template TARGET bastillebsd-templates/jellyfin
bastille template TARGET multimedia/jellyfin
```

View File

@@ -1,5 +1,5 @@
## plexmediaserver-plexpass
Bastille template for PlexMediaServer PlexPass
Bastille template for Plex Media Server PlexPass Edition
## Usage

View File

@@ -1,5 +1,5 @@
## plexmediaserver
Bastille Template for a Plex Server Jail
Bastille template for a Plex Media Server
## Usage
```shell

View File

@@ -1,5 +1,5 @@
## prometheus
Bastille Template to bootstrap Prometheus.
Bastille template to bootstrap Prometheus.
## Usage
```shell

View File

@@ -1,9 +1,8 @@
## semaphore
Bastille Template for Semaphore
Bastille template for Semaphore
## Usage
```shell
ishmael ~ # bastille template TARGET bastillebsd-templates/semaphore
bastille template TARGET net-mgmt/semaphore
```

View File

@@ -1,5 +1,5 @@
## telegraf
Bastille Template to bootstrap Telegraf
Bastille template to bootstrap Telegraf
## Usage
```shell

View File

@@ -3,5 +3,5 @@ Bastille template to bootstrap Unifi
## Usage
```shell
bastille template TARGET bastillebsd-templates/unifi
bastille template TARGET net-mgmt/unifi
```

View File

@@ -1,10 +1,10 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/zabbix-agent/badges/master/pipeline.svg)](https://gitlab.com/bastillebsd-templates/zabbix-agent/commits/master)
# zabbix-agent
Bastille template to bootstrap zabbix-agent
## Usage
```shell
bastille template TARGET bastillebsd-templates/zabbix-agent
bastille template TARGET net-mgmt/zabbix-agent
```
## Post Install Steps

View File

@@ -1,5 +1,5 @@
INCLUDE bastillebsd-templates/nginx
INCLUDE bastillebsd-templates/mysql-server
INCLUDE www/nginx
INCLUDE databases/mysql-server
PKG zabbix54-server zabbix54-frontend zabbix54-agent
SYSRC zabbix_server_enable=YES

View File

@@ -1,9 +1,8 @@
## zabbix-server
Bastille template to bootstrap zabbix-server
## Usage
```shell
bastille template TARGET bastillebsd-templates/zabbix-server
bastille template TARGET net-mgmt/zabbix-server
```

View File

@@ -1,15 +1,11 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/bazarr/badges/main/pipeline.svg)](https://gitlab.com/bastillebsd-templates/bazarr/commits/main)
## Bazarr
Bazarr is a companion application to Sonarr and Radarr that manages and downloads subtitles based on your requirements.
Bazarr is a companion application to Sonarr and Radarr that manages and
downloads subtitles based on your requirements.
## Usage
```shell
bastille template TARGET bastillebsd-templates/bazarr
bastille template TARGET net-p2p/bazarr
```
For more options edit `/usr/local/bastille/templates/bastillebsd-templates/bazarr/Bastillefile`
For more options edit `/usr/local/bastille/templates/net-p2p/bazarr/Bastillefile`

View File

@@ -1,16 +1,14 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/lidarr/badges/main/pipeline.svg)](https://gitlab.com/bastillebsd-templates/lidarr/commits/main)
## Lidarr
Lidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new tracks from your favorite artists and will grab, sort and rename them. It can also be configured
to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
Lidarr is a music collection manager for Usenet and BitTorrent users. It can
monitor multiple RSS feeds for new tracks from your favorite artists and will
grab, sort and rename them. It can also be configured to automatically upgrade
the quality of files already downloaded when a better quality format becomes
available.
## Usage
```shell
bastille template TARGET bastillebsd-templates/lidarr
bastille template TARGET net-p2p/lidarr
```
For more options edit `/usr/local/bastille/templates/bastillebsd-templates/lidarr/Bastillefile`
For more options edit `/usr/local/bastille/templates/net-p2p/lidarr/Bastillefile`

View File

@@ -1,12 +1,13 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/prowlarr/badges/main/pipeline.svg)](https://gitlab.com/bastillebsd-templates/prowlarr/commits/main)
## Prowlarr
Prowlarr is an indexer manager/proxy built on the popular arr .net/reactjs base stack to integrate with your various PVR apps. Prowlarr supports management of both Torrent Trackers and Usenet Indexers. It integrates seamlessly with Lidarr, Mylar3, Radarr, Readarr, and Sonarr offering complete management of your indexers with no per app Indexer setup required (we do it all).
Prowlarr is an indexer manager/proxy built on the popular arr .net/reactjs base
stack to integrate with your various PVR apps. Prowlarr supports management of
both Torrent Trackers and Usenet Indexers. It integrates seamlessly with
Lidarr, Mylar3, Radarr, Readarr, and Sonarr offering complete management of
your indexers with no per app Indexer setup required (we do it all).
## Usage
```shell
bastille template TARGET bastillebsd-templates/prowlarr
bastille template TARGET net-p2p/prowlarr
```
For more options edit `/usr/local/bastille/templates/bastillebsd-templates/Prowlarr/Bastillefile`
For more options edit `/usr/local/bastille/templates/net-p2p/prowlarr/Bastillefile`

View File

@@ -1,11 +1,8 @@
## Status
[![pipeline status](https://gitlab.com/bastillebsd-templates/radarr/badges/main/pipeline.svg)](https://gitlab.com/bastillebsd-templates/radarr/commits/main)
## Radarr
Bastille Template for Radarr
Bastille template for Radarr
## Usage
```shell
bastille template TARGET bastillebsd-templates/radarr
bastille template TARGET net-p2p/radarr
```

View File

@@ -1,8 +1,7 @@
## sonarr
Bastille Template for Sonarr
Bastille template for Sonarr
## Usage
```shell
bastille template TARGET bastillebsd-templates/sonarr
bastille template TARGET net-p2p/sonarr
```

View File

@@ -13,7 +13,7 @@ instructions on how to do so.
### custom config
Use a custom `/etc/ssh/sshd_config` in the template:
1. fork bastillebsd-templates/openssh-server
1. fork security/openssh-server
2. add an `CP etc` directive to the Bastillefile
3. add an `etc/ssh/sshd_config` in the template
4. commit; bootstrap fork; apply template
@@ -21,6 +21,6 @@ Use a custom `/etc/ssh/sshd_config` in the template:
### Use custom `sshd_flags`:
Use custom `sshd_flags` in jailed ssh service:
1. fork bastillebsd-templates/openssh-server
1. fork security/openssh-server
2. update the Bastillefile and add `SYSRC sshd_flags=""`
3. commit; bootstrap fork; apply template

View File

@@ -1,5 +1,5 @@
## zsh-antigen
Bastille Template to setup zsh-antigen
Bastille template to setup zsh-antigen
## Usage
```shell

View File

@@ -0,0 +1,4 @@
PKG bastille
SYSRC bastille_enable=YES
CMD bastille setup
CMD bastille bootstrap https://github.com/bastillebsd/templates

View File

@@ -0,0 +1,13 @@
# sysutils/bastille
Jail automation framework
https://bastillebsd.org
## Bastille Usage
```shell
bastille template TARGET sysutils/bastille
```
## Rocinante Usage
```shell
rocinante template sysutils/bastille
```

View File

@@ -0,0 +1,2 @@
PKG rocinante
CMD rocinante bootstrap https://github.com/bastillebsd/templates

View File

@@ -0,0 +1,12 @@
# rocinante
Bastille template to bootstrap Rocinante
## Bastille Usage
```shell
bastille template TARGET sysutils/rocinante
```
## Rocinante Usage
```shell
rocinante template sysutils/rocinante
```

View File

@@ -3,5 +3,5 @@ Bastille template to bootstrap Salt Minion
## Usage
```shell
ishmael ~ # bastille template TARGET sysutils/salt-minion
bastille template TARGET sysutils/salt-minion
```

View File

@@ -1,8 +1,7 @@
## adguardhome-exporter
Bastille Template for Adguard Home Prometheus Exporter
Bastille template for Adguard Home Prometheus Exporter
## Usage
```shell
bastille template TARGET bastillebsd-templates/adguardhome-exporter
bastille template TARGET www/adguardhome-exporter
```

View File

@@ -1,5 +1,5 @@
## adguardhome
Bastille Template for Adguard Home
Bastille template for Adguard Home
## Usage
```shell

11
www/forgejo/Bastillefile Normal file
View File

@@ -0,0 +1,11 @@
ARG SECRET_KEY
ARG JWT_SECRET
ARG INTERNAL_TOKEN
PKG forgejo
CP usr /
RENDER /usr/local/etc/forgejo/conf/app.ini
CMD chown -R git:git /usr/local/etc/forgejo
SYSRC forgejo_enable=YES
CMD export FORGEJO_CUSTOM=/usr/local/etc/forgejo
SERVICE forgejo start

13
www/forgejo/README.md Normal file
View File

@@ -0,0 +1,13 @@
# www/forgejo
Compact self-hosted Git service
https://forgejo.org/
## Bastille Usage
```shell
bastille template TARGET www/forgejo --arg SECRET_KEY=`openssl rand -base64 16` --arg JWT_SECRET=`openssl rand -base64 32` --arg INTERNAL_TOKEN=`openssl rand -base64 64`
```
## Rocinante Usage
```shell
bastille template www/forgejo --arg SECRET_KEY=`openssl rand -base64 16` --arg JWT_SECRET=`openssl rand -base64 32` --arg INTERNAL_TOKEN=`openssl rand -base64 64`
```

View File

@@ -0,0 +1,92 @@
#
# Sample Configuration for Gitea using SQLite
#
# For information on the available settings, consult the online
# documentation, or see the accompanying file app.ini.defaults, which
# contains the settings incorporated into the gitea binary.
#
# This sample configuration runs Gitea with a local database. Before
# running this configuration, make sure to change the INTERNAL_TOKEN,
# JWT_SECRET, and SECRET_KEY variables. SECRET_KEY is a password of your
# choosing, INTERNAL_TOKEN is a 64-byte random number in BASE64 encoding,
# JWT_SECRET is a 32-byte random number in BASE64 encoding.
#
# You can generate the token using for example:
# openssl rand -base64 64
#
# You can let Gitea add these to the config for you; you need to make
# app.ini writeable by the git user.
#
# There are no pre-configured users; the first user to register becomes an
# admin. In this sample configuration, the HTTP server only listens on
# localhost.
#
# If you'd rather use the web-based installer, remove this conf/app.ini file
# and make /usr/local/etc/gitea/conf writeable to the git user.
APP_NAME = Gitea: Git with a cup of tea
RUN_USER = git
RUN_MODE = prod
[database]
DB_TYPE = sqlite3
HOST = ${JAIL_IP}: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 = ${JWT_SECRET}
[picture]
AVATAR_UPLOAD_PATH = /var/db/gitea/data/avatars
DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = false
[repository]
ROOT = /var/db/gitea/gitea-repositories
# Gitea's default is 'bash', so if you have bash installed, you can comment
# this out.
SCRIPT_TYPE = sh
[repository.upload]
TEMP_PATH = /var/db/gitea/data/tmp/uploads
[security]
INSTALL_LOCK = true
INTERNAL_TOKEN = ${INTERNAL_TOKEN}
SECRET_KEY = ${SECRET_KEY}
[session]
PROVIDER = file
PROVIDER_CONFIG = /var/db/gitea/data/sessions
[server]
DOMAIN = ${JAIL_NAME}
HTTP_ADDR = ${JAIL_IP}
HTTP_PORT = 3000
ROOT_URL = http://${JAIL_IP}: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 = false
ENABLE_CAPTCHA = true
REQUIRE_SIGNIN_VIEW = false

View File

@@ -1 +0,0 @@
gitlab-ce

View File

@@ -3,5 +3,5 @@ Bastille template to bootstrap GitLab CE
## Usage
```shell
bastille template TARGET bastillebsd-templates/gitlab-ce
bastille template TARGET www/gitlab-ce
```

View File

@@ -1 +0,0 @@
gitlab start

View File

@@ -1 +0,0 @@
gitlab_enable=YES

View File

@@ -1,4 +1,4 @@
INCLUDE bastillebsd-templates/mariadb-server
INCLUDE bastillebsd-templates/apache
INCLUDE databases/mariadb-server
INCLUDE www/apache
PKG nextcloud-php74
PKG nextcloud-php84