From edbfc70c0586b78fce71136729d7cb3b67b2f11f Mon Sep 17 00:00:00 2001 From: StreetLamb Date: Thu, 27 Jun 2024 00:19:46 +0800 Subject: [PATCH 1/2] Update Qdrant dashboard URL in readme and add Traefik labels for qdrant service --- README.md | 2 +- docker-compose.yml | 12 ++++++++++++ local-deployment.md | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 744ad047..89742c9c 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,7 @@ EMBEDDING_MODEL=BAAI/bge-small-en-v1.5 # Change this ``` > [!WARNING] -> If your existing and new embedding models have different vector dimensions, you may need to recreate your Qdrant collection. You can delete the collection through the Qdrant Dashboard at [http://localhost:6333/dashboard#/collections](http://localhost:6333/dashboard#/collections). Therefore, it is better to plan ahead which embedding model is most suitable for your workflows. +> If your existing and new embedding models have different vector dimensions, you may need to recreate your Qdrant collection. You can delete the collection through the Qdrant Dashboard at [http://qdrant.localhost/dashboard](http://qdrant.localhost/dashboard). Therefore, it is better to plan ahead which embedding model is most suitable for your workflows. ### Guides diff --git a/docker-compose.yml b/docker-compose.yml index 6f398f44..7fbeb0cd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,6 +42,18 @@ services: - app-qdrant-data:/qdrant/storage environment: - QDRANT__SERVICE__API_KEY=${QDRANT__SERVICE__API_KEY?Variable not set} + labels: + - traefik.enable=true + - traefik.docker.network=traefik-public + - traefik.constraint-label=traefik-public + - traefik.http.routers.${STACK_NAME?Variable not set}-qdrant-http.rule=Host(`qdrant.${DOMAIN?Variable not set}`) + - traefik.http.routers.${STACK_NAME?Variable not set}-qdrant-http.entrypoints=http + - traefik.http.routers.${STACK_NAME?Variable not set}-qdrant-http.middlewares=https-redirect + - traefik.http.routers.${STACK_NAME?Variable not set}-qdrant-https.rule=Host(`qdrant.${DOMAIN?Variable not set}`) + - traefik.http.routers.${STACK_NAME?Variable not set}-qdrant-https.entrypoints=https + - traefik.http.routers.${STACK_NAME?Variable not set}-qdrant-https.tls=true + - traefik.http.routers.${STACK_NAME?Variable not set}-qdrant-https.tls.certresolver=le + - traefik.http.services.${STACK_NAME?Variable not set}-qdrant.loadbalancer.server.port=6333 backend: image: "${DOCKER_IMAGE_BACKEND?Variable not set}:${TAG-latest}" diff --git a/local-deployment.md b/local-deployment.md index fd3fbc1a..d6a82b62 100644 --- a/local-deployment.md +++ b/local-deployment.md @@ -79,7 +79,7 @@ Once the containers are running, you can access various services through the fol - **Frontend**: [http://localhost/](http://localhost/) - **Backend API Documentation**: [http://localhost/docs/](http://localhost/docs/) - **Backend API Base URL**: [http://localhost/api/](http://localhost/api/) -- **Qdrant Dashboard**: [http://localhost:6333/dashboard](http://localhost:6333/dashboard) +- **Qdrant Dashboard**: [http://qdrant.localhost/dashboard](http://qdrant.localhost/dashboard) - **Adminer**: [http://adminer.localhost/](http://adminer.localhost/) ## Troubleshooting From c5865d4b807d6d6119a85dfa09b677f4f075866e Mon Sep 17 00:00:00 2001 From: StreetLamb Date: Thu, 27 Jun 2024 00:22:01 +0800 Subject: [PATCH 2/2] Fix frontend to use http instead of https when calling backend api while running local production deployment --- docker-compose.local.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker-compose.local.yml b/docker-compose.local.yml index 2f3271fd..a32fe2e5 100644 --- a/docker-compose.local.yml +++ b/docker-compose.local.yml @@ -25,6 +25,11 @@ services: - traefik.http.middlewares.admin-auth.basicauth.users=${USERNAME?Variable not set}:${HASHED_PASSWORD?Variable not set} - traefik.http.routers.traefik-dashboard-http.middlewares=admin-auth + frontend: + build: + args: + - VITE_API_URL=http://${DOMAIN?Variable not set} + networks: traefik-public: external: false