-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample-config.toml
More file actions
80 lines (70 loc) · 2.52 KB
/
example-config.toml
File metadata and controls
80 lines (70 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# vsTaskViewer Configuration Example
# Copy this file to /etc/vsTaskViewer.toml
[server]
port = 8080
# Path to HTML directory containing error pages and viewer.html
html_dir = "./html"
# Path to task output directory (default: /var/vsTaskViewer)
# Must be owned by the process executor and have 700 permissions
# task_dir = "/var/vsTaskViewer"
# User to run as (default: www-data)
# exec_user = "www-data"
# Allowed origins for WebSocket connections (empty = allow all, for internal networks)
# allowed_origins = ["http://localhost:8080", "https://example.com"]
# Rate limiting: requests per minute per IP (0 = disabled)
rate_limit_rpm = 60
# Max request body size in bytes (0 = default 10MB)
max_request_size = 10485760
# TLS configuration (optional, leave empty to disable HTTPS)
# tls_key_file = "/etc/ssl/private/key.pem"
# tls_cert_file = "/etc/ssl/certs/fullchain.pem"
[auth]
# Secret key for JWT token signing (use a strong random string in production)
secret = ""
# Define tasks that can be executed
[[tasks]]
name = "example-task"
description = "Example task that runs a simple command"
command = "echo 'Hello from task' && sleep 5 && echo 'Task completed'"
# Maximum execution time in seconds (0 = no limit)
max_execution_time = 300
[[tasks]]
name = "long-running-task"
description = "A longer running task example"
command = "for i in {1..10}; do echo \"Iteration $i\"; sleep 2; done"
max_execution_time = 600
[[tasks]]
name = "error-task"
description = "Task that generates some error output"
command = "echo 'This is stdout' && echo 'This is stderr' >&2 && exit 0"
max_execution_time = 60
# Example task with parameters
# Parameters are substituted in the command using {{param_name}} syntax
[[tasks]]
name = "parameterized-task"
description = "Example task with parameters"
command = "echo 'Processing file: {{filename}} with timeout: {{timeout}} seconds' && sleep {{timeout}} && echo 'Done'"
max_execution_time = 300
# Parameter definitions
[[tasks.parameters]]
name = "filename"
type = "string" # Parameter type: "int" or "string"
optional = false # Required parameter
[[tasks.parameters]]
name = "timeout"
type = "int" # Must be digits 0-9 only
optional = true # Optional parameter
# Another example with only optional parameters
[[tasks]]
name = "optional-params-task"
description = "Task with only optional parameters"
command = "echo 'Message: {{message}}' && echo 'Count: {{count}}'"
max_execution_time = 60
[[tasks.parameters]]
name = "message"
type = "string"
optional = true
[[tasks.parameters]]
name = "count"
type = "int"
optional = true