From b13810d68bd35faa6e3fde2dd8975287972a1840 Mon Sep 17 00:00:00 2001 From: Tianyang Date: Sat, 1 Aug 2026 09:25:11 +0800 Subject: [PATCH] feat: add docker-compose.yml for backend + frontend + meilisearch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MinIO stays out of this compose file per the design spec — it's deployed independently, with MINIO_ENDPOINT overridable via env for wherever it actually lives. Meilisearch uses the official image directly (no Dockerfile needed); frontend's VITE_API_BASE_URL is left empty since nginx.conf already proxies /api/ to the backend service. --- docker-compose.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..47afe75 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,38 @@ +services: + backend: + build: ./backend + environment: + MINIO_ENDPOINT: ${MINIO_ENDPOINT:-minio:9000} + MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin} + MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin} + MINIO_BUCKET: ${MINIO_BUCKET:-dochub} + MEILISEARCH_HOST: http://meilisearch:7700 + MEILISEARCH_API_KEY: ${MEILISEARCH_API_KEY:-} + MEILISEARCH_INDEX: ${MEILISEARCH_INDEX:-documents} + CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:8080} + depends_on: + - meilisearch + restart: unless-stopped + + frontend: + build: + context: ./frontend + args: + VITE_API_BASE_URL: "" + ports: + - "8080:80" + depends_on: + - backend + restart: unless-stopped + + meilisearch: + image: getmeili/meilisearch:v1.10 + environment: + MEILI_MASTER_KEY: ${MEILISEARCH_API_KEY:-} + MEILI_NO_ANALYTICS: "true" + volumes: + - meilisearch-data:/meili_data + restart: unless-stopped + +volumes: + meilisearch-data: