> For the complete documentation index, see [llms.txt](https://docs.infotopics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infotopics.com/writebackextreme/getting-started/getting-started/containerization/repository-database.md).

# Repository database

Changing the repository database when using Docker will be described on this page. By default WriteBackExtreme Docker will use `sqlite`, but if that is not an option it can be changed via environment variables.

{% hint style="warning" %}
Do not use the `$` character in your password. This character does not play well in the configuration file.
{% endhint %}

### MS SQL Server

The following environment variables can be passed when starting a container and it will connect to the given database and its credentials.

<table data-full-width="false"><thead><tr><th width="292">Key</th><th width="96">Type</th><th width="100" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>WBE_DB_DRIVER</td><td>String</td><td>true</td><td>Value: sqlsrv</td></tr><tr><td>WBE_DB_HOST</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_DATABASE</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_USERNAME</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_PASSWORD</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_PORT</td><td>Number</td><td>false</td><td>Default: 1433</td></tr><tr><td>WBE_SQLSRV_ENCRYPT</td><td>Number</td><td>false</td><td>Yes or No</td></tr><tr><td>WBE_SQLSRV_TRUST_SERVER</td><td>String</td><td>false</td><td>1 or 0</td></tr></tbody></table>

Some Microsoft SQL Database servers have certificates that could not be verified by our application.

`WBE_SQLSRV_TRUST_SERVER`: Set to `1` to disable ssl certificate validation for the SQL Server database. More can be read [here](https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnectionstringbuilder.trustservercertificate?view=net-8.0-pp).

`WBE_SQLSRV_ENCRYPT`: SQL Server database uses SSL encryption Set to `"yes"` to use encryption. To disable encryption set to `"no"`. Read more about this [here](https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnectionstringbuilder.encrypt?view=net-8.0-pp).

### PostgreSQL

The following environment variables can be passed when starting a container and it will connect to the given database and its credentials.

<table data-full-width="false"><thead><tr><th width="292">Key</th><th width="96">Type</th><th width="100" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>WBE_DB_DRIVER</td><td>String</td><td>true</td><td>Value: pgsql</td></tr><tr><td>WBE_DB_HOST</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_DATABASE</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_USERNAME</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_PASSWORD</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_PORT</td><td>Number</td><td>false</td><td>Default: 5432</td></tr><tr><td>WBE_DB_SCHEMA</td><td>String</td><td>false</td><td>Default: PUBLIC</td></tr></tbody></table>

### MySQL

The following environment variables can be passed when starting a container and it will connect to the given database and its credentials.

<table data-full-width="false"><thead><tr><th width="292">Key</th><th width="96">Type</th><th width="100" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>WBE_DB_DRIVER</td><td>String</td><td>true</td><td>Value: mysql</td></tr><tr><td>WBE_DB_HOST</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_DATABASE</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_USERNAME</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_PASSWORD</td><td>String</td><td>true</td><td></td></tr><tr><td>WBE_DB_PORT</td><td>Number</td><td>false</td><td>Default: 3306</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.infotopics.com/writebackextreme/getting-started/getting-started/containerization/repository-database.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
