DocHub/docker-compose.yml
Tianyang b13810d68b feat: add docker-compose.yml for backend + frontend + meilisearch
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.
2026-08-01 09:25:11 +08:00

39 lines
989 B
YAML

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: