Docker Compose Configuration¶
The default docker-compose.yml runs OneSearch as one container with managed Meilisearch inside it. That is the recommended setup for new installs.
Service shape¶
The default service exposes one port:
That serves the web UI, API, and FastAPI docs:
http://localhost:8000http://localhost:8000/apihttp://localhost:8000/docs
Image vs local build¶
For local development, the compose file builds from the repo:
For a normal install, use the published image and remove or comment out build:
Required environment¶
At minimum, set these in .env:
MEILI_MASTER_KEY protects the search engine. SESSION_SECRET signs login tokens.
Volumes¶
The default managed setup uses two named volumes:
onesearch_data stores the SQLite database and app data. onesearch_index stores the managed Meilisearch index.
Mount your files separately, preferably read-only:
volumes:
- onesearch_data:/app/data
- onesearch_index:/app/meili_data
- /home/alex/Documents:/data/documents:ro
- /mnt/nas/photos:/data/photos:ro
When adding sources, use /data/documents and /data/photos, not the host paths.
See Volume Mounts for more examples.
Legacy external Meilisearch¶
Existing two-container installs can keep using docker-compose.legacy.yml.
Use that when you want to run Meilisearch as a separate service or point OneSearch at your own Meilisearch instance:
For new installs, stick with the default managed compose file unless you have a reason not to.
After editing compose¶
After changing ports, environment, or mounts:
If you added new source mounts, add or update the matching source path in the web UI. If you changed what a source can see, run a reindex.