Skip to content
Snippets Groups Projects

Explain configuration options in README.md

Merged Lyuben Penkovski requested to merge readme-configuration into main
1 file
+ 73
1
Compare changes
  • Side-by-side
  • Inline
+ 73
1
@@ -54,7 +54,79 @@ DIDs (sender, recipient) and some metainfo for the connection.
### Configuration
Configuration is defined in [`config.json`](./config.json). The service tries to find the file in
the working directory of the `svdx` process when it starts.
the working directory of the `svdx` process when it starts. Below is an example config.json file with
brief explanation of the sections and options:
```json
{
"http": {
"host": "",
"port": "8080",
"idleTimeout": "60s",
"readTimeout": "10s",
"writeTimeout": "10s"
},
"smtp": {
"host": "",
"port": "10025"
},
"smtpClient": {
"addr": "mailhog:1025",
"user": "",
"pass": "",
"hostname": "mail.example.com"
},
"didcomm": {
"did": "did:web:localhost%3A8080:svdx:v1:didcomm",
"serviceEndpoint": "https://localhost:8080/svdx/v1/didcomm/message",
"writeTimeout": "10s"
},
"db": {
"file": "didcomm.db"
},
"logLevel": "debug"
}
```
##### `http` section
Define the `svdx` web server configuration, its listening host and port and some timeouts.
##### `smtp` section
Define the `svdx` SMTP server configuration, where svdx will listen for incoming emails from postfix.
##### `smtpClient` section
Define the SMTP configuration of the postfix where the `svdx` must return emails for SMTP delivery.
##### `didcomm` section
Define the didcomm attributes of the `svdx` service.
`did` specifies the DID of the `svdx`. It is created manually by using the public host of the service
and the path where the DID document is exposed. As an example, if the service is exposed at
`https://svdx-service.com` the DID of the service will be:
```
did:web:svdx-service.com:v1:didcomm
```
`serviceEndpoint` specifies the URL where the `svdx` accepts DIDComm messages. If we take the example
above, the service endpoint must be:
```
https://svdx-service.com/v1/didcomm/message
```
`writeTimeout` specifies a timeout for sending DIDComm messages to other `svdx` instances.
##### `db` section
Define the filename of the sqlite database that will be used for storing DIDComm connections.
##### `logLevel` section
Define the logging level of the service. By default log level is `info`, but during development,
deployment and debugging it should be set in the config to `debug`.
### Local development with Docker Compose
Loading