Files
myDrive/docker-compose.yml
T
oxmc 22af2caec7
Release Please / release-please (push) Has been cancelled
Docker Build and Push (Development) / build-and-push-dev (push) Has been cancelled
feat: default to SQLite engine, disable Mongo service by default in compose
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.
2026-07-05 04:48:54 -07:00

63 lines
2.3 KiB
YAML

services:
app:
container_name: mydrive
image: kylehoell/mydrive:latest
volumes:
# Use the following volumes section if you want to use bind mounts:
# - /path/to/data:/data/
# - /path/to/temp:/temp/
# Use the following volumes section if you want to use named volumes:
- mydrive-data:/data/
- mydrive-temp:/temp/
# Only needed when DB_ENGINE=sqlite - stores the embedded SQLite
# metadata file, separate from mydrive-data (which holds file bytes).
- db-data:/db-data/
ports:
- "${HTTP_PORT:-3000}:3000"
# Optional: Uncomment the following line if you want to use HTTPS
#- "${HTTPS_PORT:-8080}:8080"
# Use expose: if using a reverse proxy
# expose:
# - 3000
# - 8080
env_file:
- .env # Copy .env.example to .env and fill in the values
# Mongo service - only needed when DB_ENGINE=mongo in your .env file.
# Commented out by default since DB_ENGINE now defaults to sqlite (metadata
# is stored in an embedded SQLite file under the db-data volume via
# SQLITE_DB_PATH, so no separate database service is required by default).
# Note: db-data is also mounted into the app service above for this reason -
# it's not Mongo-exclusive, it just also happens to be where Mongo keeps its data.
#
# To bring MongoDB back: uncomment this service block below, set
# DB_ENGINE=mongo and MONGODB_URL in your .env file, then
# `docker compose up --build`. Any existing data already stored in
# db-data from prior Mongo use is preserved either way.
#
# mongo:
# image: mongo:8
# container_name: mongo
# restart: always
# environment:
# MONGO_INITDB_ROOT_USERNAME: username
# MONGO_INITDB_ROOT_PASSWORD: password
# expose:
# - 27017
# volumes:
# - db-data:/data/db
# healthcheck:
# test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
# timeout: 10s
# interval: 10s
# retries: 10
# start_period: 10s
# Use the following volumes section if you want to use named volumes.
volumes:
mydrive-data:
mydrive-temp:
db-data: