feat: default to SQLite engine, disable Mongo service by default in compose
Release Please / release-please (push) Has been cancelled
Docker Build and Push (Development) / build-and-push-dev (push) Has been cancelled

Mongo services in both compose files are now commented out (with instructions
to re-enable) since DB_ENGINE now defaults to sqlite - no separate database
container required out of the box. db-data volume is mounted into the app
service (not just mongo) so it can hold the SQLite file too.

Also fixes a require-order bug in tests/utils/express-app.js: routers were
required (eagerly instantiating DB singletons via dbFactory) before the test
env file was loaded, so DB_ENGINE from .env.test was silently never applied -
it only worked before because the old hardcoded default happened to be mongo.
This commit is contained in:
2026-07-05 04:48:54 -07:00
parent ecc340e7b1
commit 22af2caec7
5 changed files with 86 additions and 58 deletions
+10 -8
View File
@@ -3,17 +3,19 @@ DOCKER=true
# Database Engine: Choose between "mongo" and "sqlite", this specifies where file/folder/user METADATA is stored.
# This is separate from DB_TYPE below, which controls where the raw file BYTES are stored.
# mongo = MongoDB (default)
# sqlite = embedded SQLite file, no separate database server needed
DB_ENGINE=mongo
# sqlite = embedded SQLite file, no separate database server needed (default)
# mongo = MongoDB - requires uncommenting the mongo service in the compose file
DB_ENGINE=sqlite
# MongoDB URL: Connection string for your MongoDB database (only used when DB_ENGINE=mongo)
# Note: if using the compose file provided, the connection string should be as follows:
MONGODB_URL=mongodb://username:password@mongo:27017/mydrive?authSource=admin
# MongoDB URL (only used when DB_ENGINE=mongo): Connection string for your MongoDB database.
# Note: if using the compose file provided, uncomment the mongo service there first,
# then the connection string should be as follows:
# MONGODB_URL=mongodb://username:password@mongo:27017/mydrive?authSource=admin
# SQLite DB Path (only used when DB_ENGINE=sqlite): path to the SQLite database file.
# Should live inside a persisted volume (e.g. the same one used for FS_DIRECTORY) so it survives restarts.
SQLITE_DB_PATH=/data/mydrive.db
# Should live inside a persisted volume so it survives restarts.
# Note: if using the compose file provided, this should point into the db-data volume:
SQLITE_DB_PATH=/db-data/mydrive.db
# Database Type: Choose between "fs" and "s3", this specifies where the files will be stored.
# fs = Filesystem