Skip to content

Commit dc045c2

Browse files
committed
docs: describe monitoring
1 parent 73289d6 commit dc045c2

File tree

4 files changed

+76
-5
lines changed

4 files changed

+76
-5
lines changed

.vscode/settings.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,11 @@
1717
"editor.defaultFormatter": "vscode.css-language-features"
1818
},
1919
"javascript.preferences.importModuleSpecifier": "relative",
20-
"typescript.preferences.importModuleSpecifier": "relative"
20+
"typescript.preferences.importModuleSpecifier": "relative",
21+
"github.copilot.enable": {
22+
"*": true,
23+
"plaintext": false,
24+
"scminput": false,
25+
"markdown": true
26+
}
2127
}

docs/examples/docker-compose.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ volumes:
77

88
services:
99
proxy:
10-
image: traefik:3.1
10+
image: traefik:3.2
11+
restart: unless-stopped
1112
volumes:
1213
- /var/run/docker.sock:/var/run/docker.sock:ro
1314
- ./traefik.yaml:/traefik.yml
@@ -33,6 +34,7 @@ services:
3334

3435
backend:
3536
image: ghcr.io/openscript-ch/quassel-backend:latest
37+
restart: unless-stopped
3638
volumes:
3739
- storage:/app/storage
3840
depends_on:
@@ -59,13 +61,15 @@ services:
5961

6062
database:
6163
image: postgres:17.0-alpine
64+
restart: unless-stopped
6265
volumes:
6366
- database:/var/lib/postgresql/data
6467
environment:
6568
POSTGRES_PASSWORD: "secret"
6669

6770
frontend:
6871
image: ghcr.io/openscript-ch/quassel-frontend:latest
72+
restart: unless-stopped
6973
environment:
7074
API_URL: https://api.test.example.com
7175
labels:
@@ -83,6 +87,7 @@ services:
8387

8488
mockup:
8589
image: ghcr.io/openscript-ch/quassel-mockup:latest
90+
restart: unless-stopped
8691
labels:
8792
- "com.centurylinklabs.watchtower.enable=true"
8893
- "traefik.enable=true"
@@ -96,8 +101,9 @@ services:
96101
- "traefik.http.routers.mockup-https-service=mockup-http-service"
97102
- "traefik.http.services.mockup-http-service.loadbalancer.server.port=80"
98103

99-
watchtower:
104+
updates:
100105
image: containrrr/watchtower
106+
restart: unless-stopped
101107
volumes:
102108
- /var/run/docker.sock:/var/run/docker.sock
103109
command: --http-api-update
@@ -107,3 +113,11 @@ services:
107113
- "com.centurylinklabs.watchtower.enable=false"
108114
ports:
109115
- 8080:8080
116+
117+
metrics:
118+
image: grafana/agent:v0.43.3
119+
restart: unless-stopped
120+
volumes:
121+
- ./grafana-agent.yaml:/etc/grafana-agent.yaml
122+
command:
123+
- --config.file=/etc/grafana-agent.yaml

docs/examples/grafana-agent.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
server:
2+
log_level: info
3+
4+
metrics:
5+
global:
6+
scrape_interval: 300s
7+
remote_write:
8+
- url: "<endpoint>"
9+
bearer_token: "<token>"
10+
11+
configs:
12+
- name: "docker"
13+
scrape_configs:
14+
- job_name: "docker"
15+
static_configs:
16+
- targets: ["host.docker.internal:9323"]

docs/setup.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Getting started
44

5-
The following steps describe how to set up the Quassel.
5+
The following steps describe how to set up the Quassel application system.
66

77
### Environment
88

@@ -89,7 +89,9 @@ The following sources were used:
8989

9090
### Application system
9191

92-
1. Clone this repository
92+
The following steps describe how to set up the application system:
93+
94+
1. Copy the example files
9395

9496
```bash
9597
cd /srv \
@@ -120,6 +122,39 @@ The following sources were used:
120122
docker compose -f docker-compose.yaml up -d
121123
```
122124

125+
### Automatic updates
126+
127+
For automatic updates, there is a watchtower service configured. This service exposes an endpoint at `http://test.example.com:8080/v1/update`. If a HTTP GET request is sent including the configured secret Bearer token to this endpoint, watchtower will pull new images and restart the services accordingly.
128+
129+
### Monitoring
130+
131+
The following opinionated steps describe to push data to a Grafana instance via Prometheus:
132+
133+
1. Get the remote url and token.
134+
1. Enable [Docker Metrics](https://docs.docker.com/engine/daemon/prometheus/).
135+
1. Add the following to the Docker daemon configuration file `/etc/docker/daemon.json`:
136+
137+
```json
138+
{
139+
"metrics-addr" : "localhost:9323"
140+
}
141+
```
142+
143+
1. Restart the Docker daemon with `systemctl restart docker`.
144+
1. Copy the Grafana Agent configuration example:
145+
146+
```bash
147+
wget https://raw.githubusercontent.com/openscript-ch/quassel/refs/heads/main/docs/examples/grafana-agent.yaml
148+
```
149+
150+
1. Replace the `remote_write` url and token in `grafana-agent.yaml`.
151+
1. `<endpoint>` with the remote url.
152+
1. `<token>` with the token.
153+
154+
## Tasks
155+
156+
The following sections describe the tasks to take care of the application system.
157+
123158
### Release a new version
124159

125160
1. Merge the release pull request and wait for completion of the pipeline.

0 commit comments

Comments
 (0)