You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documentation development instructions (hestiacp#3098)
* Update documentation development instructions
- Use yarn instead pnpm
- Update command
* Add VM and UI development instructions
* Add links to yarnpkg.com and nodejs.org
Co-authored-by: Alec Rust <me@alecrust.com>
[View the current guidelines](https://github.com/hestiacp/hestiacp/blob/main/CONTRIBUTING.md).
3
+
Hestia is an open-source project, and we welcome contributions from the community. Please read the [contributing guidelines](https://github.com/hestiacp/hestiacp/blob/main/CONTRIBUTING.md) for additional information.
4
+
5
+
Hestia is designed to run on a web server. To develop Hestia locally, we recommend using a virtual machine.
4
6
5
7
::: warning
6
-
Development builds are always unstable. If you encounter a bug please [report it via GitHub](https://github.com/hestiacp/hestiacp/issues/new/choose) or [submit a Pull request](https://github.com/hestiacp/hestiacp/pulls).
8
+
Development builds are unstable. If you encounter a bug please [report it via GitHub](https://github.com/hestiacp/hestiacp/issues/new/choose) or [submit a Pull request](https://github.com/hestiacp/hestiacp/pulls).
9
+
:::
10
+
11
+
## Running Hestia in a virtual machine
12
+
13
+
Here are example instructions for running Hestia for development in a virtual machine.
14
+
15
+
These instructions use [Multipass](https://multipass.run/) to create the VM. Feel free to adapt the commands for any virtualization software you prefer.
16
+
17
+
1.[Install Multipass](https://multipass.run/install) for your OS.
18
+
19
+
1.[Fork Hestia](https://github.com/hestiacp/hestiacp/fork) and clone the repository to your local machine
_(update the [installation flags](../introduction/getting-started#list-of-installation-options) to your liking, note that login credentials are set here)_
1. Visit the VM's IP address in your browser using the default Hestia port, bypass any SSL warnings and login with `admin`/`password123`
73
+
74
+
```bash
75
+
e.g. https://192.168.64.15:8083
76
+
```
77
+
78
+
You now have Hestia running in a virtual machine. The following section will cover how to make changes to Hestia and test them locally.
79
+
80
+
## Making changes to Hestia
81
+
82
+
After setting up Hestia in a VM you can now make changes to the source code in `$HOME/projects/hestiacp` on your local machine using your editor of choice.
83
+
84
+
The following are example instructions for making a change to Hestia's UI and testing it locally.
85
+
86
+
::: info
87
+
Please ensure you have [Yarn](https://yarnpkg.com) v3 installed and are using [Node.js](https://nodejs.org/en/) v16 or higher.
7
88
:::
8
89
9
-
## Compiling
90
+
1. At the root of the project on your local machine, install Node dependencies
91
+
92
+
```bash
93
+
yarn install
94
+
```
95
+
96
+
1. Make a change to a file that we can later test, then build the UI assets
97
+
98
+
_e.g. change the body background color to red in `web/css/src/base.css` then run:_
1. Reload the page in your browser to see your changes
118
+
119
+
Please refer to the [contributing guidelines](https://github.com/hestiacp/hestiacp/blob/main/CONTRIBUTING.md) for more details on submitting code changes for review.
120
+
121
+
### Building packages
10
122
11
123
::: info
12
124
For building `hestia-nginx` or `hestia-php`, at least 2 GB of memory is required!
13
125
:::
14
126
15
-
Go into the `src` folder and run one of these commands:
127
+
Here is more detailed information about the build scripts that are run from `src`:
16
128
17
-
###Compile only
129
+
#### Build packages only
18
130
19
131
```bash
20
132
# Only Hestia
@@ -26,10 +138,10 @@ Go into the `src` folder and run one of these commands:
Any option can be appended to the installer command. [See the complete list](../introduction/getting-started#list-of-installation-options).
66
180
67
-
## Update Hestia from GitHub
181
+
## Updating Hestia from GitHub
182
+
183
+
The following is useful for pulling the latest staging/beta changes from GitHub and compiling the changes.
68
184
69
185
::: info
70
186
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.
@@ -74,7 +190,7 @@ The following method only supports building the `hestia` package. If you need to
74
190
v-update-sys-hestia-git [USERNAME] [BRANCH]
75
191
```
76
192
77
-
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:
193
+
**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:
78
194
79
195
```bash
80
196
dpkg: error processing package hestia (–install):
@@ -87,9 +203,9 @@ To solve this issue, run:
87
203
apt install -f
88
204
```
89
205
90
-
## Automated testing
206
+
## Running automated tests
91
207
92
-
For automated testing, we currently use [Bats](https://github.com/bats-core/bats-core).
208
+
For automated tests we currently use [Bats](https://github.com/bats-core/bats-core).
0 commit comments