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
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,8 @@ This is the complete complete list of environmental variables that can be set.
52
52
| CACHE_EXPIRESIN | No | 3600 |[Max age in seconds](https://github.com/fastify/fastify-caching)|
53
53
| CACHE_SERVERCACHE | No | undefined | Max age in seconds for [shared cache](https://github.com/fastify/fastify-caching) (i.e. CDN) |
54
54
| RATE_MAX | No | undefined | Requests per minute [rate limiter](https://github.com/fastify/fastify-rate-limit) (limiter not used if RATE_LIMIT not set) |
55
+
| SSL_ROOT_CERT | No | undefined | Contents of a CA certificate for connecting over SSL. Use this if you need to store the entire certificate in an environment variable, e.g. for Docker. |
56
+
| SSL_ROOT_CERT_PATH | No | undefined | Path to a CA certificate file for connecting over SSL. Note that setting `SSL_ROOT_CERT` overrides this. |
55
57
56
58
57
59
### Step 3: fire it up!
@@ -151,3 +153,21 @@ map.on('load', function() {
151
153
### Changes require a Restart
152
154
153
155
If you modify code or add a route, dirt will not see it until dirt is restarted.
156
+
157
+
### TLS/SSL
158
+
159
+
If you see an error like
160
+
161
+
```
162
+
no pg_hba.conf entry for host <host>, user <user>, database <database>, no encryption
163
+
```
164
+
165
+
you may need to connect to your server over SSL. Obtain a CA certificate and set `SSL_ROOT_CERT_PATH=<path to the certificate>` in `.env`. If you're still getting an error, check the end of your connection string for `?sslmode=require` and try removing it. You should still be able to connect over SSL.
166
+
167
+
If you're running Dirt on Docker, it may be easier to pass the contents of the certificate with `SSL_ROOT_CERT`. Example:
If you can't get a certificate or want to bypass the error, you can try setting `NODE_TLS_REJECT_UNAUTHORIZED=0`. Note that this is unsafe and is not recommended in production.
0 commit comments