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
Copy file name to clipboardExpand all lines: docs/docs/contributing/development.md
+28-52Lines changed: 28 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,24 +12,14 @@ Development builds are unstable. If you encounter a bug please [report it via Gi
12
12
13
13
These are example instructions for creating a virtual machine running Hestia for development.
14
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.
15
+
These instructions use [Multipass](https://multipass.run/) to create an Ubuntu VM. Feel free to adapt the commands for any virtualization software you prefer.
16
16
17
-
::: warning
18
-
Sometimes the mapping between the source code directory on your local machine to the directory in the VM can be lost with a "failed to obtain exit status for remote process" error. If this happens simply unmount and remount e.g.
19
-
20
-
```bash
21
-
multipass unmount hestia-dev
22
-
multipass mount $HOME/projects/hestiacp hestia-dev:/home/ubuntu/hestiacp
23
-
```
24
-
25
-
:::
26
-
27
-
1.[Install Multipass](https://multipass.run/install) for your OS.
17
+
1.[Install Multipass](https://multipass.run/install) for your OS
28
18
29
19
1.[Fork Hestia](https://github.com/hestiacp/hestiacp/fork) and clone the repository to your local machine
1. Navigate to `/install`and install Hestia with these flags
53
+
1. Navigate to `/install`in the VM then install Hestia with these flags
78
54
79
55
_(update the [installation flags](../introduction/getting-started#list-of-installation-options) to your liking, note that login credentials are set here)_
80
56
@@ -89,7 +65,9 @@ multipass mount $HOME/projects/hestiacp hestia-dev:/home/ubuntu/hestiacp
89
65
reboot
90
66
```
91
67
92
-
1. Find the IP address of the VM
68
+
1. On your local machine, find the IP address of the VM
69
+
70
+
_(give the VM time to reboot for the IP to appear)_
93
71
94
72
```bash
95
73
multipass list
@@ -99,31 +77,29 @@ multipass mount $HOME/projects/hestiacp hestia-dev:/home/ubuntu/hestiacp
99
77
100
78
_(proceed past any SSL errors you see when loading the page)_
101
79
102
-
```bash
103
-
e.g. https://192.168.64.15:8083
104
-
```
80
+
e.g. <https://192.168.64.15:8083>
105
81
106
82
Hestia is now running in a virtual machine. If you'd like to make changes to the source code and test them in your browser, please continue to the next section.
107
83
108
-
## Making changes to Hestia
84
+
::: warning
85
+
Sometimes (with Multipass) the mapping between the source code directory on your local machine to the directory in the VM can be lost with a "failed to obtain exit status for remote process" error. If this happens simply unmount and remount e.g.
109
86
110
-
After setting up Hestia in a VM you can now make changes to the source code at `$HOME/projects/hestiacp` on your local machine (outside of the VM) using your editor of choice.
87
+
```bash
88
+
multipass unmount hestia-dev
89
+
multipass mount ~/projects/hestiacp hestia-dev:/home/ubuntu/hestiacp
90
+
```
111
91
112
-
The following are example instructions for making a change to Hestia's UI and testing it locally.
92
+
:::
113
93
114
-
1. At the root of the project on your local machine, ensure the latest packages are installed
94
+
## Making changes to Hestia
115
95
116
-
```bash
117
-
npm install
118
-
```
96
+
After setting up Hestia in a development VM you can now make changes to the source code at `~/projects/hestiacp` on your local machine (outside of the VM) using your editor of choice.
119
97
120
-
1. Make a change to a file that we can later test, then build the UI assets
98
+
Below are some instructions for making a change to Hestia's UI, running the build script and testing the change locally.
121
99
122
-
_e.g. change the body background color to red in `web/css/src/base.css` then run:_
100
+
1. On your local machine, make a change to a file that is easy to test
123
101
124
-
```bash
125
-
npm run build
126
-
```
102
+
_e.g. change the body background color to red in `web/css/src/base.css`_
127
103
128
104
1. SSH into the VM as root and navigate to `/src`
129
105
@@ -138,15 +114,15 @@ The following are example instructions for making a change to Hestia's UI and te
1. Reload the page in your browser to see your changes
117
+
1. Reload the page in your browser to see the change
118
+
119
+
Please refer to the [contributing guidelines](https://github.com/hestiacp/hestiacp/blob/main/CONTRIBUTING.md#development-guidelines) for more details on submitting code changes for review.
142
120
143
121
::: info
144
-
A backup is created each time the Hestia build script is run. If you run this a lot it can fill up your VM's disk space.
122
+
A backup is created each time the Hestia build script is run. If you run this often it can fill up your VM's disk space.
145
123
You can delete the backups by running `rm -rf /root/hst_backups` as root user on the VM.
146
124
:::
147
125
148
-
Please refer to the [contributing guidelines](https://github.com/hestiacp/hestiacp/blob/main/CONTRIBUTING.md) for more details on submitting code changes for review.
149
-
150
126
## Running automated tests
151
127
152
128
We currently use [Bats](https://github.com/bats-core/bats-core) to run our automated tests.
0 commit comments