Skip to content

Commit 299e04b

Browse files
authored
Inline configuration documentation (sqlpad#470)
Inlines configuration documentation in README. Also adds a few config-example files. Docker Hub doesn't handle links correctly so inlining this information makes it available everywhere. The script to generate documentation has been removed, along with the descriptions in the configItems.js. From here on out the README and example files can be updated manually.
1 parent 227b954 commit 299e04b

5 files changed

Lines changed: 275 additions & 294 deletions

File tree

README.md

Lines changed: 168 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,174 @@ A docker image may be built using the Dockerfile located in `server` directory.
6565

6666
## Configuration
6767

68-
[CONFIGURATION.md](CONFIGURATION.md)
68+
SQLPad may be configured via environment variables, config file, or command line flags.
69+
70+
Config file path may be specified passing command line option `--config` or environment variable `SQLPAD_CONFIG`.
71+
For example:
72+
73+
```sh
74+
node server.js --config ~/.sqlpadrc
75+
```
76+
77+
For INI and JSON config file examples, see `config-example.ini` and `config-example.json` in GitHub repository.
78+
79+
### Version 3 changes
80+
81+
Previously SQLPad supported a default dbPath of `$HOME/sqlpad/db` and a default config file path of `$HOME/.sqlpadrc`.
82+
83+
These defaults have been removed in version 3.
84+
85+
### Config variables
86+
87+
**admin**
88+
Email address to whitelist/give admin permissions to
89+
Env var: `SQLPAD_ADMIN`
90+
91+
**allowCsvDownload**
92+
Enable csv and xlsx downloads.
93+
Env var: `SQLPAD_ALLOW_CSV_DOWNLOAD`
94+
Default: `true`
95+
96+
**baseUrl**
97+
Path to mount sqlpad app following domain. Example, if '/sqlpad' is provided queries page would be mydomain.com/sqlpad/queries
98+
Env var: `SQLPAD_BASE_URL`
99+
100+
**certPassphrase**
101+
Passphrase for your SSL certification file
102+
Env var: `CERT_PASSPHRASE`
103+
104+
**certPath**
105+
Absolute path to where SSL certificate is stored
106+
Env var: `CERT_PATH`
107+
108+
**cookieSecret**
109+
Secret used to sign cookies
110+
Env var: `SQLPAD_COOKIE_SECRET`
111+
Default: `secret-used-to-sign-cookies-please-set-and-make-strong`
112+
113+
**dbPath**
114+
Directory to store SQLPad embedded database content. This includes queries, users, query result cache files, etc.
115+
Env var: `SQLPAD_DB_PATH`
116+
117+
**debug**
118+
Add a variety of logging to console while running SQLPad
119+
Env var: `SQLPAD_DEBUG`
120+
121+
**disableUserpassAuth**
122+
Set to TRUE to disable built-in user authentication. Use to restrict auth to OAuth only.
123+
Env var: `DISABLE_USERPASS_AUTH`
124+
125+
**editorWordWrap**
126+
Enable word wrapping in SQL editor.
127+
Env var: `SQLPAD_EDITOR_WORD_WRAP`
128+
129+
**googleClientId**
130+
Google Client ID used for OAuth setup. Authorized redirect URI for sqlpad is '[baseurl]/auth/google/callback'
131+
Env var: `GOOGLE_CLIENT_ID`
132+
133+
**googleClientSecret**
134+
Google Client Secret used for OAuth setup. Authorized redirect URI for sqlpad is '[baseurl]/auth/google/callback'
135+
Env var: `GOOGLE_CLIENT_SECRET`
136+
137+
**httpsPort**
138+
Port for SQLPad to listen on.
139+
Env var: `SQLPAD_HTTPS_PORT`
140+
Default: `443`
141+
142+
**ip**
143+
IP address to bind to. By default SQLPad will listen from all available addresses (0.0.0.0).
144+
Env var: `SQLPAD_IP`
145+
Default: `0.0.0.0`
146+
147+
**keyPath**
148+
Absolute path to where SSL certificate key is stored
149+
Env var: `KEY_PATH`
150+
151+
**passphrase**
152+
A string of text used to encrypt sensitive values when stored on disk.
153+
Env var: `SQLPAD_PASSPHRASE`
154+
Default: `At least the sensitive bits won't be plain text?`
155+
156+
**port**
157+
Port for SQLPad to listen on.
158+
Env var: `SQLPAD_PORT`
159+
Default: `80`
160+
161+
**publicUrl**
162+
Public URL used for OAuth setup and email links. Protocol expected. Example: https://mysqlpad.com
163+
Env var: `PUBLIC_URL`
164+
165+
**queryResultMaxRows**
166+
By default query results are limited to 50,000 records.
167+
Env var: `SQLPAD_QUERY_RESULT_MAX_ROWS`
168+
Default: `50000`
169+
170+
**samlAuthContext**
171+
SAML authentication context URL
172+
Env var: `SAML_AUTH_CONTEXT`
173+
174+
**samlCallbackUrl**
175+
SAML callback URL
176+
Env var: `SAML_CALLBACK_URL`
177+
178+
**samlCert**
179+
SAML certificate in Base64
180+
Env var: `SAML_CERT`
181+
182+
**samlEntryPoint**
183+
SAML Entry point URL
184+
Env var: `SAML_ENTRY_POINT`
185+
186+
**samlIssuer**
187+
SAML Issuer
188+
Env var: `SAML_ISSUER`
189+
190+
**sessionMinutes**
191+
Minutes to keep a session active. Will extended by this amount each request.
192+
Env var: `SQLPAD_SESSION_MINUTES`
193+
Default: `60`
194+
195+
**slackWebhook**
196+
Supply incoming Slack webhook URL to post query when saved.
197+
Env var: `SQLPAD_SLACK_WEBHOOK`
198+
199+
**smtpFrom**
200+
From email address for SMTP. Required in order to send invitation emails.
201+
Env var: `SQLPAD_SMTP_FROM`
202+
203+
**smtpHost**
204+
Host address for SMTP. Required in order to send invitation emails.
205+
Env var: `SQLPAD_SMTP_HOST`
206+
207+
**smtpPassword**
208+
Password for SMTP.
209+
Env var: `SQLPAD_SMTP_PASSWORD`
210+
211+
**smtpPort**
212+
Port for SMTP. Required in order to send invitation emails.
213+
Env var: `SQLPAD_SMTP_PORT`
214+
215+
**smtpSecure**
216+
Toggle to use secure connection when using SMTP.
217+
Env var: `SQLPAD_SMTP_SECURE`
218+
Default: `true`
219+
220+
**smtpUser**
221+
Username for SMTP. Required in order to send invitation emails.
222+
Env var: `SQLPAD_SMTP_USER`
223+
224+
**systemdSocket**
225+
Acquire socket from systemd if available
226+
Env var: `SQLPAD_SYSTEMD_SOCKET`
227+
228+
**tableChartLinksRequireAuth**
229+
When false, table and chart result links will be operational without login.
230+
Env var: `SQLPAD_TABLE_CHART_LINKS_REQUIRE_AUTH`
231+
Default: `true`
232+
233+
**whitelistedDomains**
234+
Allows pre-approval of email domains. Delimit multiple domains by empty space.
235+
Env var: `WHITELISTED_DOMAINS`
69236

70237
## Development
71238

0 commit comments

Comments
 (0)