Skip to content

Commit fdbea95

Browse files
committed
settings tabs
1 parent e106347 commit fdbea95

File tree

7 files changed

+282
-117
lines changed

7 files changed

+282
-117
lines changed

docs/Advanced Configuration/Other Customisations.md

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
sidebar_position: 13
33
---
4+
import Tabs from '@theme/Tabs';
5+
import TabItem from '@theme/TabItem';
6+
47
# Other Customisations
58

69
Stirling PDF offers various other customisation options, such as:
@@ -24,10 +27,29 @@ system:
2427
In configs/Settings.yml
2528
2629
### Using an outgoing HTTP(S) proxy
27-
To make Stirling PDF use an outgoing proxy server (e.g. for checking the license validity), the `JAVA_CUSTOM_OPTS` environment variable need to be used to set some Java properties:
28-
```
29-
-Dhttp.proxyHost=proxyserver -Dhttp.proxyPort=8888
30-
-Dhttp.nonProxyHosts="localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local"
31-
-Dhttps.proxyHost=proxyserver -Dhttps.proxyPort=888
32-
-Dhttps.nonProxyHosts="localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local"
33-
```
30+
To make Stirling PDF use an outgoing proxy server (e.g. for checking the license validity):
31+
32+
<Tabs groupId="config-methods">
33+
<TabItem value="env" label="Environment Variable">
34+
```bash
35+
JAVA_CUSTOM_OPTS="-Dhttp.proxyHost=proxyserver -Dhttp.proxyPort=8888 -Dhttp.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local' -Dhttps.proxyHost=proxyserver -Dhttps.proxyPort=8888 -Dhttps.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local'"
36+
```
37+
</TabItem>
38+
<TabItem value="docker-run" label="Docker Run">
39+
```bash
40+
docker run -d \
41+
-p 8080:8080 \
42+
-e JAVA_CUSTOM_OPTS="-Dhttp.proxyHost=proxyserver -Dhttp.proxyPort=8888 -Dhttp.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local' -Dhttps.proxyHost=proxyserver -Dhttps.proxyPort=8888 -Dhttps.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local'" \
43+
stirlingtools/stirling-pdf:latest
44+
```
45+
</TabItem>
46+
<TabItem value="docker-compose" label="Docker Compose">
47+
```yaml
48+
services:
49+
stirling-pdf:
50+
image: stirlingtools/stirling-pdf:latest
51+
environment:
52+
JAVA_CUSTOM_OPTS: "-Dhttp.proxyHost=proxyserver -Dhttp.proxyPort=8888 -Dhttp.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local' -Dhttps.proxyHost=proxyserver -Dhttps.proxyPort=8888 -Dhttps.nonProxyHosts='localhost|127.0.0.1|127.0.1.1|127.0.0.0/8|::1|10.0.0.0/8|.svc|.cluster.local'"
53+
```
54+
</TabItem>
55+
</Tabs>

docs/Analytics-and-telemetry.md

Lines changed: 75 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ sidebar_position: 9
33
title: Analytics and Telemetry
44
id: analytics-telemetry
55
---
6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
68

79
# Analytics and Telemetry
810

@@ -137,16 +139,27 @@ Analytics are governed by a **global master toggle**, **component toggles**, and
137139
138140
Controls **all** analytics and whether a consent banner appears.
139141
140-
**Environment variable**
141-
```bash
142-
SYSTEM_ENABLEANALYTICS=false # true | false | (unset = null)
143-
```
144-
145-
**settings.yml**
146-
```yaml
147-
system:
148-
enableAnalytics: false # true | false | null (unset)
149-
```
142+
<Tabs groupId="config-methods">
143+
<TabItem value="settings" label="Settings File">
144+
```yaml
145+
system:
146+
enableAnalytics: false # true | false | null (unset)
147+
```
148+
</TabItem>
149+
<TabItem value="env" label="Environment Variable">
150+
```bash
151+
SYSTEM_ENABLEANALYTICS=false # true | false | (unset = null)
152+
```
153+
</TabItem>
154+
<TabItem value="docker-compose" label="Docker Compose">
155+
```yaml
156+
services:
157+
stirling-pdf:
158+
environment:
159+
SYSTEM_ENABLEANALYTICS: false
160+
```
161+
</TabItem>
162+
</Tabs>
150163

151164
**Behavior**
152165
- `false`: Disables **all** analytics (no consent banner; PostHog & Scarf are off).
@@ -157,23 +170,37 @@ system:
157170

158171
Use these to selectively enable/disable providers **in addition** to the global toggle.
159172

160-
**PostHog**
161-
```bash
162-
SYSTEM_ENABLEPOSTHOG=false
163-
```
164-
```yaml
165-
system:
166-
enablePosthog: false # true | false | null
167-
```
168-
169-
**Scarf tracking pixel**
170-
```bash
171-
SYSTEM_ENABLESCARF=false
172-
```
173-
```yaml
174-
system:
175-
enableScarf: false # true | false | null
176-
```
173+
**PostHog:**
174+
175+
<Tabs groupId="config-methods">
176+
<TabItem value="settings" label="Settings File">
177+
```yaml
178+
system:
179+
enablePosthog: false # true | false | null
180+
```
181+
</TabItem>
182+
<TabItem value="env" label="Environment Variable">
183+
```bash
184+
SYSTEM_ENABLEPOSTHOG=false
185+
```
186+
</TabItem>
187+
</Tabs>
188+
189+
**Scarf tracking pixel:**
190+
191+
<Tabs groupId="config-methods">
192+
<TabItem value="settings" label="Settings File">
193+
```yaml
194+
system:
195+
enableScarf: false # true | false | null
196+
```
197+
</TabItem>
198+
<TabItem value="env" label="Environment Variable">
199+
```bash
200+
SYSTEM_ENABLESCARF=false
201+
```
202+
</TabItem>
203+
</Tabs>
177204

178205
**Interaction**
179206
- If `enableAnalytics` is `false`, everything is off regardless of component toggles.
@@ -201,25 +228,27 @@ When analytics are allowed globally (`system.enableAnalytics: true` or resolved
201228

202229
If you want to disable **all** analytics and telemetry (and suppress any consent prompts) at once:
203230

204-
**Environment variable**
205-
```bash
206-
SYSTEM_ENABLEANALYTICS=false
207-
```
208-
209-
**settings.yml**
210-
```yaml
211-
system:
212-
enableAnalytics: false
213-
```
214-
215-
**Docker Compose example**
216-
```yaml
217-
services:
218-
stirling-pdf:
219-
environment:
220-
- SYSTEM_ENABLEANALYTICS=false
221-
# ... other configuration
222-
```
231+
<Tabs groupId="config-methods">
232+
<TabItem value="settings" label="Settings File">
233+
```yaml
234+
system:
235+
enableAnalytics: false
236+
```
237+
</TabItem>
238+
<TabItem value="env" label="Environment Variable">
239+
```bash
240+
SYSTEM_ENABLEANALYTICS=false
241+
```
242+
</TabItem>
243+
<TabItem value="docker-compose" label="Docker Compose">
244+
```yaml
245+
services:
246+
stirling-pdf:
247+
environment:
248+
SYSTEM_ENABLEANALYTICS: false
249+
```
250+
</TabItem>
251+
</Tabs>
223252

224253
---
225254

docs/Configuration/Configuration.md

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ slug: /Configuration
44
title: Configuration Guide
55
description: Configure Stirling-PDF using environment variables, settings files, or in-app settings
66
---
7+
import Tabs from '@theme/Tabs';
8+
import TabItem from '@theme/TabItem';
79

810
# Configuration Guide
911

@@ -62,20 +64,45 @@ system:
6264
### Authentication
6365
6466
Enable user login:
65-
```bash
66-
SECURITY_ENABLELOGIN=true
67-
SECURITY_INITIALLOGIN_USERNAME=admin
68-
SECURITY_INITIALLOGIN_PASSWORD=changeme123
69-
```
67+
68+
<Tabs groupId="config-methods">
69+
<TabItem value="settings" label="Settings File">
70+
```yaml
71+
security:
72+
enableLogin: true
73+
initialLogin:
74+
username: admin
75+
password: changeme123
76+
```
77+
</TabItem>
78+
<TabItem value="env" label="Environment Variable">
79+
```bash
80+
SECURITY_ENABLELOGIN=true
81+
SECURITY_INITIALLOGIN_USERNAME=admin
82+
SECURITY_INITIALLOGIN_PASSWORD=changeme123
83+
```
84+
</TabItem>
85+
</Tabs>
7086

7187
Default credentials: `admin` / `stirling` (change immediately after first login)
7288

7389
### Language & Localization
7490

75-
```bash
76-
LANGS=en_GB # Available languages
77-
SYSTEM_DEFAULTLOCALE=en-GB # Default language
78-
```
91+
<Tabs groupId="config-methods">
92+
<TabItem value="settings" label="Settings File">
93+
```yaml
94+
langs: en_GB
95+
system:
96+
defaultLocale: en-GB
97+
```
98+
</TabItem>
99+
<TabItem value="env" label="Environment Variable">
100+
```bash
101+
LANGS=en_GB # Available languages
102+
SYSTEM_DEFAULTLOCALE=en-GB # Default language
103+
```
104+
</TabItem>
105+
</Tabs>
79106

80107
**How language selection works:**
81108

@@ -111,11 +138,26 @@ MODE=BOTH # Options: BOTH, FRONTEND, BACKEND
111138

112139
### File Upload Limits
113140

114-
```bash
115-
SYSTEM_MAXFILESIZE=2000 # MB
116-
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE=2000MB
117-
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE=2000MB
118-
```
141+
<Tabs groupId="config-methods">
142+
<TabItem value="settings" label="Settings File">
143+
```yaml
144+
system:
145+
maxFileSize: 2000 # MB
146+
spring:
147+
servlet:
148+
multipart:
149+
max-file-size: 2000MB
150+
max-request-size: 2000MB
151+
```
152+
</TabItem>
153+
<TabItem value="env" label="Environment Variable">
154+
```bash
155+
SYSTEM_MAXFILESIZE=2000 # MB
156+
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE=2000MB
157+
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE=2000MB
158+
```
159+
</TabItem>
160+
</Tabs>
119161

120162
### Memory Management
121163

docs/Configuration/Extra-Settings.md

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
sidebar_position: 12
33
title: Custom Settings Configuration
44
---
5+
import Tabs from '@theme/Tabs';
6+
import TabItem from '@theme/TabItem';
57

68
# Custom Settings Configuration
79

@@ -48,16 +50,44 @@ server:
4850
4951
Configure HTTPS for secure connections:
5052
51-
```yaml
52-
server:
53-
port: 8443 # Standard HTTPS port
54-
ssl:
55-
enabled: true
56-
key-store: classpath:keystore.p12 # Path to keystore file
57-
key-store-password: your-keystore-password
58-
key-store-type: PKCS12 # Type of keystore
59-
key-alias: tomcat # Alias of the certificate
60-
```
53+
<Tabs groupId="config-methods">
54+
<TabItem value="settings" label="Settings File">
55+
```yaml
56+
server:
57+
port: 8443 # Standard HTTPS port
58+
ssl:
59+
enabled: true
60+
key-store: classpath:keystore.p12 # Path to keystore file
61+
key-store-password: your-keystore-password
62+
key-store-type: PKCS12 # Type of keystore
63+
key-alias: tomcat # Alias of the certificate
64+
```
65+
</TabItem>
66+
<TabItem value="env" label="Environment Variable">
67+
```bash
68+
SERVER_PORT=8443
69+
SERVER_SSL_ENABLED=true
70+
SERVER_SSL_KEY-STORE=classpath:keystore.p12
71+
SERVER_SSL_KEY-STORE-PASSWORD=your-keystore-password
72+
SERVER_SSL_KEY-STORE-TYPE=PKCS12
73+
SERVER_SSL_KEY-ALIAS=tomcat
74+
```
75+
</TabItem>
76+
<TabItem value="docker-compose" label="Docker Compose">
77+
```yaml
78+
services:
79+
stirling-pdf:
80+
image: stirlingtools/stirling-pdf:latest
81+
environment:
82+
SERVER_PORT: 8443
83+
SERVER_SSL_ENABLED: true
84+
SERVER_SSL_KEY-STORE: classpath:keystore.p12
85+
SERVER_SSL_KEY-STORE-PASSWORD: your-keystore-password
86+
SERVER_SSL_KEY-STORE-TYPE: PKCS12
87+
SERVER_SSL_KEY-ALIAS: tomcat
88+
```
89+
</TabItem>
90+
</Tabs>
6191

6292
### Creating a Self-Signed Certificate
6393

docs/Configuration/Fail2Ban.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,32 @@ Stirling-PDF logs failed authentication attempts to a log file which Fail2Ban mo
1717
## Prerequisites
1818
- Fail2Ban installed on your system
1919
- Access to Stirling-PDF log directory
20-
- Security settings configured in `/configs/settings.yml`:
21-
```yaml
22-
security:
23-
enableLogin: true # Login must be enabled for Fail2Ban integration
24-
loginAttemptCount: -1 # Set to -1 when using Fail2Ban recommended but not required
25-
```
20+
- Security settings configured:
21+
22+
<Tabs groupId="config-methods">
23+
<TabItem value="settings" label="Settings File">
24+
```yaml
25+
security:
26+
enableLogin: true # Login must be enabled for Fail2Ban integration
27+
loginAttemptCount: -1 # Set to -1 when using Fail2Ban recommended but not required
28+
```
29+
</TabItem>
30+
<TabItem value="env" label="Environment Variable">
31+
```bash
32+
SECURITY_ENABLELOGIN=true
33+
SECURITY_LOGINATTEMPTCOUNT=-1
34+
```
35+
</TabItem>
36+
<TabItem value="docker-compose" label="Docker Compose">
37+
```yaml
38+
services:
39+
stirling-pdf:
40+
environment:
41+
SECURITY_ENABLELOGIN: true
42+
SECURITY_LOGINATTEMPTCOUNT: -1
43+
```
44+
</TabItem>
45+
</Tabs>
2646

2747
### Important Configuration Notes
2848
- The `enableLogin` setting must be set to `true` as Fail2Ban integration requires authentication to be active

0 commit comments

Comments
 (0)