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: