This commit is contained in:
2021-12-10 00:04:38 +00:00
parent ced660e785
commit 87f62e9ab4

View File

@@ -140,7 +140,7 @@ The `AYANOVA_USE_URLS` property specifies which TCP / IP Port that AyaNova serve
The `AYANOVA_REPORT_RENDER_BROWSER_PATH` property specifies the path to the Chromium browser previously installed. The default path _may_ need to be changed if reports do not render and Chromium can not be found at the default location. The `AYANOVA_REPORT_RENDER_BROWSER_PATH` property specifies the path to the Chromium browser previously installed. The default path _may_ need to be changed if reports do not render and Chromium can not be found at the default location.
Edit the config.json file using Nano text editor: Edit the config.json file in your favorite editor, here we'll use Nano:
```bash ```bash
sudo nano config.json sudo nano config.json
@@ -148,13 +148,11 @@ sudo nano config.json
Make changes and save with `ctr-x` and type `y` to answer "Save modified buffer?" prompt. Make changes and save with `ctr-x` and type `y` to answer "Save modified buffer?" prompt.
### Set ownership and permissions ### Set ownership and permissions
AyaNova will be assumed for these instructions to run under the `www-data` user which needs permission to write to the data folder and (in a later step) execute permission on the AyaNova executable binary. AyaNova will be assumed for these instructions to run as `www-data`.
Give www-data ownership of the ayanova folder Give www-data ownership of the ayanova folder:
```bash ```bash
sudo chown -vR :www-data /var/ayanova sudo chown -vR :www-data /var/ayanova
@@ -172,23 +170,58 @@ Set permissions to read / write / execute for the .local-chromium folder:
sudo chmod -R g+rwx /var/ayanova/.local-chromium sudo chmod -R g+rwx /var/ayanova/.local-chromium
``` ```
### Create and install a service to run AyaNova automatically
As AyaNova is a server application running on a server operating system it needs to start automatically when the Linux server boots and restart automatically in the (unlikely) event that it crashes.
Create the ayanova.service file:
###
### Boot and test AyaNova server
Start the server from the AyaNova bin folder
```bash ```bash
sudo ./AyaNova sudo nano /etc/systemd/system/ayanova.service
```
Paste or re-create the following contents of the service file (edit as necessary if not using defaults):
```
[Unit]
Description=AyaNova server
[Service]
WorkingDirectory=/var/ayanova
ExecStart=/usr/bin/dotnet /var/ayanova/AyaNova.dll
Restart=always
# Restart service after 10 seconds if it crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=ayanova-server
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
```
Make the changes and save with `ctr-x` and type `y` to answer "Save modified buffer?" prompt.
Enable the service:
```bash
sudo systemctl enable ayanova.service
```
### Start and confirm AyaNova server
Start the server service
```bash
sudo systemctl start ayanova.service
```
Confirm the server is running by viewing the service status:
```bash
sudo systemctl status ayanova.service
``` ```
You should see an output in the terminal that indicates the AyaNova server version and that it is booting. Any problems found that prevent boot up will be displayed here. You should see an output in the terminal that indicates the AyaNova server version and that it is booting. Any problems found that prevent boot up will be displayed here.