doc: added .env example file and e.g. for DOCKER_DB_FOLDER

This commit is contained in:
Florian Sylvain
2024-04-26 07:56:18 +02:00
parent 2eae066a24
commit dca17a744d
2 changed files with 12 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
ENVIRONMENT=development
PORT=8080
CORS_ALLOWED_ORIGINS=*
DB_FILE=./gohcms.db
DOCKER_DB_FOLDER=./data
+7 -7
View File
@@ -39,13 +39,13 @@ of course required, but not necessarily via the `.env` file.
### Environment variables ### Environment variables
| Name | Type | Description | Comment | | Name | Type | Description | Comment |
|----------------------|--------|-----------------------------------------|-------------------------------------------------------------------------------------------------------| |----------------------|--------|-----------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| ENVIRONMENT | string | The environment the API is running in | required, `development` or `production` | | ENVIRONMENT | string | The environment the API is running in | required, `development` or `production` |
| PORT | int | The port the API will use | required | | PORT | int | The port the API will use | required |
| CORS_ALLOWED_ORIGINS | string | The allowed origins for CORS | required, semicolon separated list | | CORS_ALLOWED_ORIGINS | string | The allowed origins for CORS | required, semicolon separated list |
| DB_FILE | string | The path to the sqlite db file | required, can be at the root but name still required (e.g. `./gohcms.db`) ; have to end up with `.db` | | DB_FILE | string | The path to the sqlite db file | required, can be at the root but name still required (e.g. `./gohcms.db`) ; have to end up with `.db` |
| DOCKER_DB_FOLDER | string | The path to the sqlite db file's folder | required with docker, this will basically be the host machine folder that contains the sqlite db file | | DOCKER_DB_FOLDER | string | The path to the sqlite db file's folder | required with docker, this will basically be the host machine folder (e.g. `./data`) that contains the sqlite db file |
## API Usage ## API Usage