mirror of
https://github.com/BastilleBSD/templates.git
synced 2025-12-10 17:00:30 +01:00
Bootstrap cleanup (#4)
* README cleanup * template migration * convert percona to new bastillefile format * convert gitlab to bastillefile format * convert php to bastillefile format --------- Co-authored-by: Barry McCormick <bmccormick@debianbeast.maildragon.com>
This commit is contained in:
21
net-mgmt/semaphore/Bastillefile
Normal file
21
net-mgmt/semaphore/Bastillefile
Normal file
@@ -0,0 +1,21 @@
|
||||
ARG version="2.8.77"
|
||||
ARG username="semaphore"
|
||||
ARG password="SEmaPh0rE"
|
||||
ARG email="semaphore@example.com"
|
||||
ARG dbusername="semaphore_user"
|
||||
ARG dbname="semaphore_db"
|
||||
ARG dbpassword="SEmaPh0rE"
|
||||
ARG rootpassdb="SEmaPh0rE"
|
||||
ARG ipadd=$(ifconfig | grep 'inet' | awk -F ' ' '{ print $2 }')
|
||||
PKG semaphore mysql80-server
|
||||
CP usr /
|
||||
CMD curl -L -O -C - https://github.com/ansible-semaphore/semaphore/releases/download/v"${version}"/semaphore_"${version}"_freebsd_amd64.tar.gz
|
||||
CMD tar -zxvf semaphore_"${version}"_freebsd_amd64.tar.gz -C /usr/local/bin/ semaphore
|
||||
CMD sed -i '' 's/"user": "",/"user": "${dbusername}",/g' /usr/local/etc/semaphore/config.json
|
||||
CMD sed -i '' 's/"pass": "",/"pass": "${dbpassword}",/g' /usr/local/etc/semaphore/config.json
|
||||
CMD sed -i '' 's/"name": "",/"name": "${dbname}",/g' /usr/local/etc/semaphore/config.json
|
||||
SYSRC mysql_enable=YES
|
||||
SERVICE mysql-server start
|
||||
CMD mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '"${rootpassdb}"';CREATE DATABASE "${dbname}";CREATE USER '"${dbusername}"'@'"${ipadd}"' IDENTIFIED WITH mysql_native_password BY '"${dbpassword}"';GRANT ALL ON "${dbname}".* TO '"${dbusername}"'@'"${ipadd}"';FLUSH PRIVILEGES;";
|
||||
CMD semaphore user add --admin --login "${username}" --name "${username}" --email "${email}" --password ${password}
|
||||
CMD nohup semaphore server --config /usr/local/etc/semaphore/config.json &
|
||||
29
net-mgmt/semaphore/LICENSE
Normal file
29
net-mgmt/semaphore/LICENSE
Normal file
@@ -0,0 +1,29 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2022, Christer Edwards <christer.edwards@gmail.com>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
9
net-mgmt/semaphore/README.md
Normal file
9
net-mgmt/semaphore/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
## semaphore
|
||||
Bastille Template for Semaphore
|
||||
|
||||
## Usage
|
||||
|
||||
```shell
|
||||
ishmael ~ # bastille template TARGET bastillebsd-templates/semaphore
|
||||
```
|
||||
59
net-mgmt/semaphore/usr/local/etc/semaphore/config.json
Normal file
59
net-mgmt/semaphore/usr/local/etc/semaphore/config.json
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"mysql": {
|
||||
"host": "127.0.0.1:3306",
|
||||
"user": "",
|
||||
"pass": "",
|
||||
"name": "",
|
||||
"options": null
|
||||
},
|
||||
"bolt": {
|
||||
"host": "",
|
||||
"user": "",
|
||||
"pass": "",
|
||||
"name": "",
|
||||
"options": null
|
||||
},
|
||||
"postgres": {
|
||||
"host": "",
|
||||
"user": "",
|
||||
"pass": "",
|
||||
"name": "",
|
||||
"options": null
|
||||
},
|
||||
"dialect": "mysql",
|
||||
"port": "",
|
||||
"interface": "",
|
||||
"tmp_path": "/tmp/semaphore",
|
||||
"cookie_hash": "",
|
||||
"cookie_encryption": "",
|
||||
"access_key_encryption": "",
|
||||
"email_sender": "",
|
||||
"email_host": "",
|
||||
"email_port": "",
|
||||
"email_username": "",
|
||||
"email_password": "",
|
||||
"web_host": "",
|
||||
"ldap_binddn": "",
|
||||
"ldap_bindpassword": "",
|
||||
"ldap_server": "",
|
||||
"ldap_searchdn": "",
|
||||
"ldap_searchfilter": "",
|
||||
"ldap_mappings": {
|
||||
"dn": "",
|
||||
"mail": "",
|
||||
"uid": "",
|
||||
"cn": ""
|
||||
},
|
||||
"telegram_chat": "",
|
||||
"telegram_token": "",
|
||||
"slack_url": "",
|
||||
"max_parallel_tasks": 0,
|
||||
"email_alert": false,
|
||||
"email_secure": false,
|
||||
"telegram_alert": false,
|
||||
"slack_alert": false,
|
||||
"ldap_enable": false,
|
||||
"ldap_needtls": false,
|
||||
"ssh_config_path": "",
|
||||
"demo_mode": false
|
||||
}
|
||||
Reference in New Issue
Block a user