Skip to content

Commit 3171a81

Browse files
committed
docs: improve database documentation
1 parent 821ed79 commit 3171a81

File tree

1 file changed

+11
-22
lines changed

1 file changed

+11
-22
lines changed

README.md

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ The recommended and only supported way for production deployments is to run the
1717

1818
### Configuration
1919

20-
The backend can be configured with the following environment variables
20+
:warning: If you do not configure a postgresql database, sqlite will automatically be used. Mount a persistent volume to the `/data` directory - this is where the sqlite database is stored. If you do not do this, you will lose all data every time the container is deleted.
2121

22-
| Name | Values | Default | Description |
23-
| ------------ | ------------------ | ---------------------------------------------------- | ------------------------------------------------------------------------------------ |
24-
| `GIN_MODE` | `release`, `debug` | `release` | The mode that gin runs in. Only set this to `debug` on your development environment! |
25-
| `LOG_FORMAT` | `json`, `human` | `json` if `GIN_MODE` is `release`, otherwise `human` | If log output is written human readable or as JSON. |
22+
The backend can be configured with the following environment variables. None are required.
23+
24+
| Name | Type | Default | Description |
25+
| ------------- | ------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------ |
26+
| `GIN_MODE` | One of `release`, `debug` | `release` | The mode that gin runs in. Only set this to `debug` on your development environment! |
27+
| `LOG_FORMAT` | One of `json`, `human` | `json` if `GIN_MODE` is `release`, otherwise `human` | If log output is written human readable or as JSON. |
28+
| `DB_HOST` | `string` | | hostname or address of postgresql |
29+
| `DB_USER` | `string` | | username for the postgresql connection |
30+
| `DB_PASSWORD` | `string` | | password for `DB_USER` |
31+
| `DB_NAME` | `string` | | name of the database to use |
2632

2733
### Deployment methods
2834

@@ -59,23 +65,6 @@ ingress:
5965
- envelope-zero.example.com
6066
```
6167
62-
### Database backends
63-
64-
Envelope Zero currently supports sqlite and postgresql as database backends. While sqlite is supported, it is highly recommended to use postgresql for production purposes.
65-
66-
#### sqlite
67-
68-
No configuration is needed, but you need to mount a persistent volume to the `/app/data` directory or the backend won’t start.
69-
70-
#### postgresql
71-
72-
Set the following environment variables:
73-
74-
- `DB_HOST`: The hostname for the postgresql instance
75-
- `DB_USER`: The username to connect with
76-
- `DB_PASSWORD`: The password for `DB_USER`
77-
- `DB_NAME`: The name of the database to use
78-
7968
## Supported Versions
8069
8170
This project is under heavy development. Therefore, only the latest release is supported.

0 commit comments

Comments
 (0)