added systemd service howto traefik nginix set_real_ip_from improved readme visuals fixed on mobile labels removed updated readme fixed visuals overlay for the hotkey disable screen lock clean up git precommit hooks clean up clean up update check for update feature added build-time information fixed date
68 lines
1.7 KiB
Markdown
68 lines
1.7 KiB
Markdown
## Deployment Setup
|
|
### On the Server
|
|
Navigate to the service directory on the server
|
|
```bash
|
|
cd /virt
|
|
```
|
|
Clone the repository
|
|
```bash
|
|
git clone --depth 1 https://gitea.virtonline.eu/2HoursProject/nexus-timer.git
|
|
cd nexus-timer
|
|
```
|
|
Build the docker image
|
|
```bash
|
|
docker build -t virt-nexus-timer .
|
|
```
|
|
## Exposing the App Behind Traefik (Reverse Proxy)
|
|
### Review the provided docker labels and systemd service file
|
|
|
|
Copy the example label file to its destination
|
|
```bash
|
|
cp docker/traefik.labels labels
|
|
```
|
|
View the example service definition:
|
|
```bash
|
|
cat systemd/virt-nexus-timer.service
|
|
```
|
|
### Create the systemd service
|
|
Use the editor to create or overwrite the service:
|
|
```bash
|
|
sudo systemctl edit --force --full virt-nexus-timer.service
|
|
```
|
|
Paste the content from `systemd/virt-nexus-timer.service`, then save and exit.
|
|
|
|
Enable on system boot and start the service
|
|
```bash
|
|
sudo systemctl enable --now virt-nexus-timer.service
|
|
```
|
|
Check the service status
|
|
```bash
|
|
systemctl status virt-nexus-timer.service
|
|
```
|
|
View real-time logs
|
|
```bash
|
|
journalctl -fu virt-nexus-timer.service
|
|
```
|
|
### Test the web application
|
|
Verify that the application is accessible via HTTPS:
|
|
```bash
|
|
curl https://nexus-timer.virtonline.eu
|
|
```
|
|
Or open it in your browser:
|
|
[https://nexus-timer.virtonline.eu](https://nexus-timer.virtonline.eu)
|
|
|
|
## Release the update
|
|
### On the Server
|
|
Navigate to the app directory on your server
|
|
```bash
|
|
cd /virt/nexus-timer
|
|
```
|
|
Pull the changes, build the docker image and restart the service
|
|
```bash
|
|
git pull && docker build -t virt-nexus-timer . && systemctl restart virt-nexus-timer.service
|
|
```
|
|
View real-time logs
|
|
```bash
|
|
journalctl -fu virt-nexus-timer.service
|
|
```
|
|
The previously installed PWA should update automatically or offer an upgrade |