Point compose to remote Elasticsearch and Qdrant
This commit is contained in:
28
README.md
28
README.md
@@ -86,25 +86,21 @@ Visit <http://localhost:8080/> and you’ll see a barebones UI that:
|
|||||||
Feel free to expand on this scaffold—add proper logging, schedule transcript
|
Feel free to expand on this scaffold—add proper logging, schedule transcript
|
||||||
updates, or flesh out the UI—once you’re happy with the baseline behaviour.
|
updates, or flesh out the UI—once you’re happy with the baseline behaviour.
|
||||||
|
|
||||||
## Run with Docker Compose
|
## Run with Docker Compose (App Only; Remote ES/Qdrant)
|
||||||
|
|
||||||
A quick single-node stack (app + Elasticsearch + Qdrant) is included:
|
The provided compose file builds/runs only the Flask app and expects **remote** Elasticsearch/Qdrant endpoints. Supply them via environment variables (directly or a `.env` alongside `docker-compose.yml`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose build
|
ELASTIC_URL=https://your-es-host:9200 \
|
||||||
docker compose up
|
QDRANT_URL=https://your-qdrant-host:6333 \
|
||||||
|
docker compose up --build
|
||||||
```
|
```
|
||||||
|
|
||||||
Services:
|
Other tunables (defaults shown in compose):
|
||||||
- **app** (port 8080): Flask UI/API, embeds queries on demand (downloads the model on first run).
|
- `ELASTIC_INDEX` (default `this_little_corner_py`)
|
||||||
- **elasticsearch** (port 9200): single node, security disabled for local use.
|
- `ELASTIC_USERNAME` / `ELASTIC_PASSWORD` or `ELASTIC_API_KEY`
|
||||||
- **qdrant** (port 6333): vector index used by `/vector-search`.
|
- `ELASTIC_VERIFY_CERTS` (set to `1` for real TLS verification)
|
||||||
|
- `QDRANT_COLLECTION` (default `tlc-captions-full`)
|
||||||
|
- `QDRANT_VECTOR_NAME` / `QDRANT_VECTOR_SIZE` / `QDRANT_EMBED_MODEL`
|
||||||
|
|
||||||
Key environment wiring (see `docker-compose.yml` for defaults):
|
Port 8080 on the host is forwarded to the app. Mount `./data` (read-only) if you want local fallbacks for metrics (`LOCAL_DATA_DIR=/app/data/video_metadata`); otherwise the app will rely purely on the remote backends. Stop the container with `docker compose down`.
|
||||||
- `ELASTIC_URL=http://elasticsearch:9200`
|
|
||||||
- `ELASTIC_INDEX=this_little_corner_py`
|
|
||||||
- `QDRANT_URL=http://qdrant:6333`
|
|
||||||
- `QDRANT_COLLECTION=tlc-captions-full`
|
|
||||||
- `LOCAL_DATA_DIR=/app/data/video_metadata` (mounted from `./data`)
|
|
||||||
|
|
||||||
Mount `./data` (read-only) if you want local fallbacks for metrics; otherwise the app relies entirely on Elasticsearch/Qdrant. Stop the stack with `docker compose down` (add `-v` to clear ES/Qdrant volumes).
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
version: "3.9"
|
version: "3.9"
|
||||||
|
|
||||||
|
# Runs only the Flask app container, pointing to remote Elasticsearch/Qdrant.
|
||||||
|
# Provide ELASTIC_URL / QDRANT_URL (and related) via environment or a .env file.
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
@@ -8,44 +10,17 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
environment:
|
environment:
|
||||||
ELASTIC_URL: http://elasticsearch:9200
|
ELASTIC_URL: ${ELASTIC_URL:?set ELASTIC_URL to your remote Elasticsearch URL}
|
||||||
ELASTIC_INDEX: this_little_corner_py
|
ELASTIC_INDEX: ${ELASTIC_INDEX:-this_little_corner_py}
|
||||||
ELASTIC_VERIFY_CERTS: "0"
|
ELASTIC_USERNAME: ${ELASTIC_USERNAME:-}
|
||||||
QDRANT_URL: http://qdrant:6333
|
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}
|
||||||
QDRANT_COLLECTION: tlc-captions-full
|
ELASTIC_API_KEY: ${ELASTIC_API_KEY:-}
|
||||||
QDRANT_VECTOR_NAME: ""
|
ELASTIC_VERIFY_CERTS: ${ELASTIC_VERIFY_CERTS:-0}
|
||||||
QDRANT_VECTOR_SIZE: "1024"
|
QDRANT_URL: ${QDRANT_URL:?set QDRANT_URL to your remote Qdrant URL}
|
||||||
QDRANT_EMBED_MODEL: BAAI/bge-large-en-v1.5
|
QDRANT_COLLECTION: ${QDRANT_COLLECTION:-tlc-captions-full}
|
||||||
LOCAL_DATA_DIR: /app/data/video_metadata
|
QDRANT_VECTOR_NAME: ${QDRANT_VECTOR_NAME:-}
|
||||||
|
QDRANT_VECTOR_SIZE: ${QDRANT_VECTOR_SIZE:-1024}
|
||||||
|
QDRANT_EMBED_MODEL: ${QDRANT_EMBED_MODEL:-BAAI/bge-large-en-v1.5}
|
||||||
|
LOCAL_DATA_DIR: ${LOCAL_DATA_DIR:-/app/data/video_metadata}
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/data:ro
|
- ./data:/app/data:ro
|
||||||
depends_on:
|
|
||||||
- elasticsearch
|
|
||||||
- qdrant
|
|
||||||
|
|
||||||
elasticsearch:
|
|
||||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.19
|
|
||||||
environment:
|
|
||||||
discovery.type: single-node
|
|
||||||
xpack.security.enabled: "false"
|
|
||||||
ES_JAVA_OPTS: -Xms1g -Xmx1g
|
|
||||||
cluster.routing.allocation.disk.threshold_enabled: "false"
|
|
||||||
ulimits:
|
|
||||||
memlock:
|
|
||||||
soft: -1
|
|
||||||
hard: -1
|
|
||||||
volumes:
|
|
||||||
- esdata:/usr/share/elasticsearch/data
|
|
||||||
ports:
|
|
||||||
- "9200:9200"
|
|
||||||
|
|
||||||
qdrant:
|
|
||||||
image: qdrant/qdrant:v1.9.1
|
|
||||||
ports:
|
|
||||||
- "6333:6333"
|
|
||||||
volumes:
|
|
||||||
- qdrant_storage:/qdrant/storage
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
esdata:
|
|
||||||
qdrant_storage:
|
|
||||||
|
|||||||
Reference in New Issue
Block a user