Browse Source

Update docs (#3562)

- Include information about building
- Include information about Remote Database
- Add information regarding Web Sockets
Jaap Marcus 2 years ago
parent
commit
3bd0589039

+ 1 - 0
docs/.vitepress/config.ts

@@ -131,6 +131,7 @@ function sidebarDocs(): DefaultTheme.SidebarItem[] {
 			text: "Contributing",
 			collapsed: false,
 			items: [
+				{ text: "Building Packages", link: "/docs/contributing/building.md" },
 				{ text: "Development", link: "/docs/contributing/development.md" },
 				{ text: "Documentation", link: "/docs/contributing/documentation.md" },
 				{ text: "Quick install app", link: "/docs/contributing/quick-install-app.md" },

+ 99 - 0
docs/docs/contributing/building.md

@@ -0,0 +1,99 @@
+# Building packages
+
+::: info
+For building `hestia-nginx` or `hestia-php`, at least 2 GB of memory is required!
+:::
+
+Here is more detailed information about the build scripts that are run from `src`:
+
+## Installing Hestia from a branch
+
+The following is useful for testing a Pull Request or a branch on a fork.
+
+1. Install Node.js [Download](https://nodejs.org/en/download) or use [Node Source APT](https://github.com/nodesource/distributions)
+
+1. Install [Yarn](https://yarnpkg.com/getting-started/install) via `corepack enable`
+
+```bash
+# Replace with https://github.com/username/hestiacp.git if you want to test a branch that you created yourself
+git clone https://github.com/hestiacp/hestiacp.git
+cd ./hestiacp/
+
+# Replace main with the branch you want to test
+git checkout main
+
+# Enable Yarn 3.x
+yarn set version stable
+# Install Dependencies
+yarn install
+# Build
+yarn build
+
+cd ./src/
+
+# Compile packages
+./hst_autocompile.sh --all --noinstall --keepbuild '~localsrc'
+
+cd ../install
+
+bash hst-install-{os}.sh --with-debs /tmp/hestiacp-src/deb/
+```
+
+Any option can be appended to the installer command. [See the complete list](../introduction/getting-started#list-of-installation-options).
+
+## Build packages only
+
+```bash
+# Only Hestia
+./scr/hst_autocompile.sh --hestia --noinstall --keepbuild '~localsrc'
+```
+
+```bash
+# Hestia + hestia-nginx and hestia-php
+./hst_autocompile.sh --all --noinstall --keepbuild '~localsrc'
+```
+
+## Build and install packages
+
+::: info
+Use if you have Hestia already installed, for your changes to take effect.
+:::
+
+```bash
+# Only Hestia
+./hst_autocompile.sh --hestia --install '~localsrc'
+```
+
+```bash
+# Hestia + hestia-nginx and hestia-php
+./hst_autocompile.sh --all --install '~localsrc'
+```
+
+## Updating Hestia from GitHub
+
+The following is useful for pulling the latest staging/beta changes from GitHub and compiling the changes.
+
+::: info
+The following method only supports building the `hestia` package. If you need to build `hestia-nginx` or `hestia-php`, use one of the previous commands.
+:::
+
+1. Install Node.js [Download](https://nodejs.org/en/download) or use [Node Source APT](https://github.com/nodesource/distributions)
+
+1. Install [Yarn](https://yarnpkg.com/getting-started/install) via `corepack enable`
+
+```bash
+v-update-sys-hestia-git [USERNAME] [BRANCH]
+```
+
+**Note:** Sometimes dependencies will get added or removed when the packages are installed with `dpkg`. It is not possible to preload the dependencies. If this happens, you will see an error like this:
+
+```bash
+dpkg: error processing package hestia (–install):
+dependency problems - leaving unconfigured
+```
+
+To solve this issue, run:
+
+```bash
+apt install -f
+```

+ 1 - 95
docs/docs/contributing/development.md

@@ -51,7 +51,7 @@ multipass mount $HOME/projects/hestiacp hestia-dev:/home/ubuntu/hestiacp
    sudo apt update && sudo apt install -y jq libjq1
    ```
 
-1. Install [Node JS](https://nodejs.org/en) and Yarn `npm install --global yarn`
+1. Install [Node JS](https://nodejs.org/en) and Yarn via `corepack enable`
 
 1. Build the theme files with
 
@@ -145,100 +145,6 @@ You can delete the backups by running `rm -rf /root/hst_backups` as root user on
 
 Please refer to the [contributing guidelines](https://github.com/hestiacp/hestiacp/blob/main/CONTRIBUTING.md) for more details on submitting code changes for review.
 
-### Building packages
-
-::: info
-For building `hestia-nginx` or `hestia-php`, at least 2 GB of memory is required!
-:::
-
-Here is more detailed information about the build scripts that are run from `src`:
-
-#### Build packages only
-
-```bash
-# Only Hestia
-./hst_autocompile.sh --hestia --noinstall --keepbuild '~localsrc'
-```
-
-```bash
-# Hestia + hestia-nginx and hestia-php
-./hst_autocompile.sh --all --noinstall --keepbuild '~localsrc'
-```
-
-#### Build and install packages
-
-::: info
-Use if you have Hestia already installed, for your changes to take effect.
-:::
-
-```bash
-# Only Hestia
-./hst_autocompile.sh --hestia --install '~localsrc'
-```
-
-```bash
-# Hestia + hestia-nginx and hestia-php
-./hst_autocompile.sh --all --install '~localsrc'
-```
-
-## Installing Hestia from a branch
-
-The following is useful for testing a Pull Request or a branch on a fork.
-
-Make sure to install [Node JS](https://nodejs.org/en) and Yarn `npm install --global yarn` before.
-
-```bash
-# Replace with https://github.com/username/hestiacp.git if you want to test a branch that you created yourself
-git clone https://github.com/hestiacp/hestiacp.git
-cd ./hestiacp/
-
-# Replace main with the branch you want to test
-git checkout main
-
-# Enable Yarn 3.x
-yarn set version stable
-# Install Dependencies
-yarn install
-# Build
-yarn build
-
-cd ./src/
-
-# Compile packages
-./hst_autocompile.sh --all --noinstall --keepbuild '~localsrc'
-
-cd ../install
-
-bash hst-install-{os}.sh --with-debs /tmp/hestiacp-src/deb/
-```
-
-Any option can be appended to the installer command. [See the complete list](../introduction/getting-started#list-of-installation-options).
-
-## Updating Hestia from GitHub
-
-The following is useful for pulling the latest staging/beta changes from GitHub and compiling the changes.
-
-::: info
-The following method only supports building the `hestia` package. If you need to build `hestia-nginx` or `hestia-php`, use one of the previous commands.
-:::
-
-```bash
-v-update-sys-hestia-git [USERNAME] [BRANCH]
-```
-
-**Note:** Sometimes dependencies will get added or removed when the packages are installed with `dpkg`. It is not possible to preload the dependencies. If this happens, you will see an error like this:
-
-```bash
-dpkg: error processing package hestia (–install):
-dependency problems - leaving unconfigured
-```
-
-To solve this issue, run:
-
-```bash
-apt install -f
-```
-
 ## Running automated tests
 
 For automated tests we currently use [Bats](https://github.com/bats-core/bats-core).

+ 31 - 0
docs/docs/server-administration/databases.md

@@ -87,3 +87,34 @@ Automated can sometimes cause issues. Login via SSH and open `/var/log/{webserve
   2. If you are behind a firewall or proxy, you may want to disable it and try again.
 - `Link has expired`
   1. Refresh the database page and try again.
+
+## Remote databases
+
+If needed you can simply host Mysql or Postgresql on a remote server.
+
+To add a remote database:
+
+```bash
+v-add-database-host TYPE HOST DBUSER DBPASS [MAX_DB] [CHARSETS] [TPL] [PORT]
+```
+
+For example:
+
+```bash
+v-add-database-host mysql db.hestiacp.com root mypassword 500
+```
+
+If you want you can setup phpMyAdmin on the host server to allow to connect to the database. Create a copy of `01-localhost` file in /etc/phpmyadmin/conf.d and change:
+
+```php
+$cfg["Servers"][$i]["host"] = "localhost";
+$cfg["Servers"][$i]["port"] = "3306";
+$cfg["Servers"][$i]["pmadb"] = "phpmyadmin";
+$cfg["Servers"][$i]["controluser"] = "pma";
+$cfg["Servers"][$i]["controlpass"] = "random password";
+$cfg["Servers"][$i]["bookmarktable"] = "pma__bookmark";
+```
+
+Please make sure to create aswell the phpmyadmin user and database.
+
+See `/usr/local/hestia/install/deb/phpmyadmin/pma.sh`

+ 12 - 0
docs/docs/server-administration/web-templates.md

@@ -147,3 +147,15 @@ FastCGI cache is an option for Nginx mode only. If you are using Nginx + Apache2
 To write custom caching templates, use the following naming scheme:
 
 `caching-yourname.tpl`, `caching-yourname.stpl` and `caching-yourname.sh`
+
+### Does Hestia support Web socket support
+
+Yes, Hestia works fine with Web sockets how ever our default templates include on default:
+
+```bash
+proxy_hide_header Upgrade
+```
+
+This resolved an issue with Safari from loading websites.
+
+To allow the use of Web sockets remove this line. Other wise Web sockets will not work