Invalid DB_ENGINE values silently fall back to SQLite instead of failing configuration
First Check
- This is not a feature request.
- I added a very descriptive title to this issue (title field is above this).
- I used the GitHub search to find a similar issue and didn't find it.
- I searched the Mealie documentation, with the integrated search.
- I already read the docs and didn't find an answer.
- This issue can be replicated on the demo site (https://demo.mealie.io/).
What is the issue you are experiencing?
DB_ENGINE is documented as supporting sqlite and postgres, but unsupported values are currently accepted instead of being rejected during configuration.
When Mealie is started with an invalid value such as DB_ENGINE=postgress, the application still starts successfully and the database provider is set to SQLite.
This creates a silent fallback. For example, a typo in a deployment intended to use PostgreSQL could result in Mealie starting with SQLite rather than reporting a configuration error.
Steps to Reproduce
Create a Docker Compose configuration for Mealie.
Set an invalid
DB_ENGINEvalue, for example:
environment:
DB_ENGINE: postgressStart the Mealie container.
Inspect the active database configuration/provider inside the running container using:
docker exec mealie-dbengine-test python -c "from mealie.core.config import get_app_settings; s=get_app_settings(); print('DB_ENGINE:', s.DB_ENGINE); print('DB_PROVIDER:', type(s.DB_PROVIDER).__name__)"- Observe that Mealie starts successfully and selects the SQLite provider instead of rejecting the unsupported value.
Please provide relevant logs
The container started successfully. Inspecting the active settings produced:
DB_ENGINE: postgress
DB_PROVIDER: SQLiteProvider
### Mealie Version
Nightly Docker image: `ghcr.io/mealie-recipes/mealie:nightly`
### Deployment
Docker (Windows)
### Additional Deployment Details
Reproduced using Docker Compose with the `ghcr.io/mealie-recipes/mealie:nightly` image.
The test configuration used:
```yaml
DB_ENGINE: postgressSource: mealie-recipes/mealie