Upload files to 'Docs/docs'
This commit is contained in:
81
Docs/docs/Dev-Adding-CMS.md
Normal file
81
Docs/docs/Dev-Adding-CMS.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# List of possible Files and expected Structure
|
||||
|
||||
* CMS/`<NewCmsName>`/
|
||||
* conf.sh
|
||||
* preconf.sh
|
||||
* apt.list
|
||||
* `<Webserver>`-conf.sh
|
||||
* `<Webserver>`-preconf.sh
|
||||
* `<Webserver>`-apt.list
|
||||
* `<Webserver>`-unconfigured
|
||||
|
||||
# File Explanation
|
||||
| File Name | Description |
|
||||
| -------- | ------------ |
|
||||
| preconf.sh | Pre config/apt install commands runs for all web servers |
|
||||
| conf.sh | Configuration runs for all webservers |
|
||||
| apt.list | packagelist for all webservers |
|
||||
| `<Webserver>`-preconf.sh | Pre config/apt install commands runs for specified webserver |
|
||||
| `<Webserver>`-conf.sh | Configuration runs for specified webserver |
|
||||
| `<Webserver>`-apt.list | packagelist for specified webserver |
|
||||
| `<Webserver>`-unconfigured | webserver(vhost) config |
|
||||
|
||||
|
||||
# Example File Content for minimal CMS using NGINX
|
||||
|
||||
## nginx-conf.sh
|
||||
```
|
||||
#Getting Nginx SiteConfig
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/<CMSName>/Nginx-unconfigured -O /tmp/nginx-siteconf
|
||||
|
||||
#Configuring Nginx SiteConfig
|
||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' /tmp/nginx-siteconf
|
||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-enabled/"$domain"
|
||||
|
||||
#Crating dir for serving documents
|
||||
mkdir -p /var/www/"$domain"/html
|
||||
chown www-data:www-data -R /var/www/"$domain"/html
|
||||
|
||||
#Restarting Nginx
|
||||
systemctl reload nginx
|
||||
```
|
||||
## Nginx-unconfigured
|
||||
|
||||
```
|
||||
#Getting Nginx SiteConfig
|
||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/<CMSName>/Nginx-unconfigured -O /tmp/nginx-siteconf
|
||||
|
||||
#Configuring Nginx SiteConfig
|
||||
sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' /tmp/nginx-siteconf
|
||||
sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-enabled/"$domain"
|
||||
|
||||
#Crating dir for serving documents
|
||||
mkdir -p /var/www/"$domain"/html
|
||||
chown www-data:www-data -R /var/www/"$domain"/html
|
||||
|
||||
#Restarting Nginx
|
||||
systemctl reload nginx
|
||||
```
|
||||
Make sure the config always starts with #beginConf and ends with #endConf
|
||||
So the installer can keep track of the config
|
||||
|
||||
|
||||
# Defining in the menu
|
||||
### Add the following to ModulesMenu.list
|
||||
For each webserver a list define seperate.
|
||||
### Rules for Cms names in menu
|
||||
* a “:” needs to be appended
|
||||
* the repo name must not contain capital leters
|
||||
* the name need a “/” pre and appended
|
||||
|
||||
Example CMS name: "test-cms"
|
||||
|
||||
### For Whiptail
|
||||
add under the previous “<WebserverName>CMSL+”
|
||||
make sure to add to all supported webservers
|
||||
```
|
||||
<WebserverName>CMSL+=("<CMSName>:" "<CMS Description>." OFF)
|
||||
```
|
||||
### For legacy
|
||||
add to the “`<WebserverName>`CMSL variable after the last entry and before "None"
|
||||
Make sure the the entry is quoted, otherwise the installer will break
|
||||
52
Docs/docs/Dev-Adding-Modules.md
Normal file
52
Docs/docs/Dev-Adding-Modules.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Module modes
|
||||
A module can be external(in other/external git repo) or internal(Modules/<ModuleName>).
|
||||
In both cases the file structure is expected as shown below
|
||||
|
||||
# List of possible Files and expected Structure
|
||||
* conf.sh
|
||||
* preconf.sh
|
||||
* apt.list
|
||||
* `<webserver>`-conf.sh
|
||||
* `<webserver>`-preconf.sh
|
||||
* `<webserver>`-apt.list
|
||||
* config/*
|
||||
|
||||
## The internal module location
|
||||
Modules/`<ModuleName>`
|
||||
|
||||
# File Explanation
|
||||
| File Name | Description |
|
||||
| -------- | ------------ |
|
||||
| preconf.sh | Pre config/apt install commands runs for all web servers |
|
||||
| conf.sh| Configuration runs for all webservers |
|
||||
| apt.list | packagelist for all webservers |
|
||||
| `<Webserver>`-preconf.sh | Pre config/apt install commands runs for specified webserver |
|
||||
| `<Webserver>`-conf.sh | Configuration runs for specified webserver |
|
||||
| `<Webserver>`-apt.list | packagelist for specified webserver |
|
||||
| config/* | Directory for config files |
|
||||
|
||||
|
||||
# Defining in the menu
|
||||
### Add the following to ModulesMenu.list
|
||||
For each webserver a list define seperate.
|
||||
### Rules for modulenames in menu for all modules
|
||||
* a “:” needs to be appended
|
||||
* the repo name must not contain capital leters
|
||||
### Rules for modulenames in menu for external modules
|
||||
* the name need a “/” pre and appended
|
||||
|
||||
Example internal module name: "mynicetest-module"
|
||||
Example external module name: "/external-nice-module/"
|
||||
|
||||
### For Whiptail
|
||||
add under the previous “<WebserverName>Options+”
|
||||
make sure to add to all supported webservers
|
||||
```
|
||||
<WebserverName>Options+=("<ModuleName>:" "<Module Description>." OFF)
|
||||
```
|
||||
### For legacy
|
||||
add to the “`<WebserverName>`Options” variable after the last entry
|
||||
Make sure the the entry is quoted, otherwise the installer will break
|
||||
### Extra step for external modules
|
||||
For external modules the raw git url shoud be added to “extModules.list”
|
||||
Example: https://git.ictmaatwerk.com/`<user>`/`<reponame>`/raw/branch/master/
|
||||
26
Docs/docs/Dev-Adding-Webserver.md
Normal file
26
Docs/docs/Dev-Adding-Webserver.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# List of possible Files and expected Structure
|
||||
* CoreModules/`<webserverName>`/
|
||||
* conf.sh
|
||||
* preconf.sh
|
||||
* apt.list
|
||||
* appendCMS-conf.sh
|
||||
* config/*
|
||||
# File Explanation
|
||||
| File Name | Description |
|
||||
| -------- | ------------ |
|
||||
| preconf.sh | Pre config/apt install commands (ex: repo setup) |
|
||||
| conf.sh | Configuration for webserver and php |
|
||||
| apt.list | packagelist for this webserver and php |
|
||||
| appendCMS-conf.sh | Runs when a domain gets added after inital install by appendCMS.sh |
|
||||
|
||||
# Defining in the menu
|
||||
Add the following to ModulesMenu.list
|
||||
## For Whiptail
|
||||
Add under the previous “webservers+”
|
||||
```
|
||||
<WebserverName>Options=("<WebserverName>:" "Will install <WebserverName> Webserver." OFF)
|
||||
```
|
||||
## For legacy
|
||||
Add to the “webservers” variable after last entry
|
||||
Make sure the the entry is quoted, otherwise the installer will break
|
||||
Make sure that <webserver>CMS and <webserver>Options are created
|
||||
26
Docs/docs/User-MainInfo.md
Normal file
26
Docs/docs/User-MainInfo.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Getting/using the Normal installer (installer.sh):
|
||||
|
||||
```
|
||||
#Get installer.sh from the repo and store it at: /tmp/installer.sh
|
||||
bash /tmp/installer.sh
|
||||
```
|
||||
# Getting/using the Legacy installer (installer.sh):
|
||||
```
|
||||
#Get installer.sh from the repo and store it at: /tmp/installer.sh
|
||||
bash /tmp/installer.sh -l 2>&1 | tee ~/output.log
|
||||
```
|
||||
|
||||
# Adding a Domain (AppendCMS.sh):
|
||||
The script wil get most information it need from stored config, only the new domain and the mysql root password need to be entered.
|
||||
|
||||
```
|
||||
#Get the AppendCMS.sh from the repo and store it at: /tmp/AppendCMS.sh
|
||||
bash /tmp/AppendCMS.sh
|
||||
```
|
||||
|
||||
# Adding a Module/Option (AppendModule.sh):
|
||||
The script wil get most information it need from stored config
|
||||
```
|
||||
#Get the AppendCMS.sh from the repo and store it at: /tmp/AppendModule.sh
|
||||
bash /tmp/AppendModule.sh
|
||||
```
|
||||
1
Docs/docs/index.md
Normal file
1
Docs/docs/index.md
Normal file
@@ -0,0 +1 @@
|
||||
### Welcome to Web-V2 Documentation
|
||||
Reference in New Issue
Block a user