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
A sample configuration file is located at `config/config.yaml`:
@@ -125,6 +112,7 @@ alert:
125
112
126
113
queue:
127
114
enable: true
115
+
debug_body: true
128
116
129
117
# AWS SNS
130
118
sns:
@@ -178,98 +166,147 @@ The application relies on several environment variables to configure alerting se
178
166
179
167
Ensure these environment variables are properly set before running the application. You can configure them in your `.env` file, Docker environment variables, or Kubernetes secrets.
180
168
181
-
## Custom Alert Templates
169
+
## Development
182
170
183
-
### Slack Template
184
-
Create your Slack message template, for example `config/slack_message.tmpl`:
171
+
### Docker
185
172
173
+
#### Basic Deployment
174
+
175
+
```bash
176
+
docker run -d \
177
+
-p 3000:3000 \
178
+
-e SLACK_ENABLE=true \
179
+
-e SLACK_TOKEN=your_slack_token \
180
+
-e SLACK_CHANNEL_ID=your_channel_id \
181
+
--name versus \
182
+
ghcr.io/versuscontrol/versus-incident
186
183
```
187
-
*Critical Error in {{.ServiceName}}*
188
-
----------
189
-
Error Details:
190
-
{{.Logs}}
191
-
----------
192
-
Owner <@{{.UserID}}> please investigate
193
-
```
194
-
### Telegram Template
195
184
196
-
For Telegram, you can use HTML formatting. Create your Telegram message template, for example `config/telegram_message.tmpl`:
185
+
#### With Custom Templates
186
+
187
+
Create a configuration file:
188
+
197
189
```
198
-
🚨 <b>Critical Error Detected!</b> 🚨
199
-
📌 <b>Service:</b> {{.ServiceName}}
200
-
⚠️ <b>Error Details:</b>
201
-
{{.Logs}}
190
+
mkdir -p ./config && touch config.yaml
202
191
```
203
-
This template will be parsed with HTML tags when sending the alert to Telegram.
204
192
205
-
### Email Template
206
-
Create your email message template, for example `config/email_message.tmpl`:
193
+
`config.yaml`:
194
+
```yaml
195
+
name: versus
196
+
host: 0.0.0.0
197
+
port: 3000
198
+
199
+
alert:
200
+
slack:
201
+
enable: true
202
+
token: ${SLACK_TOKEN}
203
+
channel_id: ${SLACK_CHANNEL_ID}
204
+
template_path: "/app/config/slack_message.tmpl"
207
205
206
+
telegram:
207
+
enable: false
208
208
```
209
-
Subject: Critical Error Alert - {{.ServiceName}}
210
209
211
-
Critical Error Detected in {{.ServiceName}}
212
-
----------------------------------------
210
+
**Configuration Notes**
213
211
214
-
Error Details:
215
-
{{.Logs}}
212
+
Ensure `template_path` in `config.yaml` matches container path:
213
+
```yaml
214
+
alert:
215
+
slack:
216
+
template_path: "/app/config/slack_message.tmpl" # For containerized env
217
+
```
216
218
217
-
Please investigate this issue immediately.
219
+
**Slack Template**
220
+
221
+
Create your Slack message template, for example `config/slack_message.tmpl`:
218
222
219
-
Best regards,
220
-
Versus Incident Management System
221
223
```
222
-
This template supports both plain text and HTML formatting for email notifications.
224
+
🔥 *Critical Error in {{.ServiceName}}*
223
225
224
-
## Development
226
+
❌ Error Details:
227
+
```{{.Logs}}```
225
228
226
-
### Docker
229
+
Owner <@{{.UserID}}> please investigate
230
+
```
231
+
232
+
**Run with volume mount:**
227
233
228
-
#### Basic Deployment
229
234
```bash
230
235
docker run -d \
231
236
-p 3000:3000 \
237
+
-v $(pwd)/config:/app/config \
232
238
-e SLACK_ENABLE=true \
233
239
-e SLACK_TOKEN=your_slack_token \
234
240
-e SLACK_CHANNEL_ID=your_channel_id \
235
241
--name versus \
236
242
ghcr.io/versuscontrol/versus-incident
237
243
```
238
244
239
-
#### With Custom Templates
245
+
Verify template mounting:
240
246
241
-
**Configuration Notes**
242
-
- Ensure `template_path` in config.yaml matches container path:
243
-
```yaml
244
-
alert:
245
-
slack:
246
-
template_path: "/app/config/slack_message.tmpl"# For containerized env
247
-
```
248
-
- File permissions: Templates must be readable by the app user (UID 1000 in Dockerfile)
249
-
250
-
1. Create local config directory with your templates:
0 commit comments