added build-time information

This commit is contained in:
cpu
2025-05-09 23:07:30 +02:00
parent 29d54cdd40
commit 824d977546
10 changed files with 367 additions and 401 deletions

68
docs/deployment.md Normal file
View File

@@ -0,0 +1,68 @@
## 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