init. project
This commit is contained in:
135
rag-web-ui/docker-compose.dev.yml
Normal file
135
rag-web-ui/docker-compose.dev.yml
Normal file
@@ -0,0 +1,135 @@
|
||||
services:
|
||||
nginx-dev:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx.dev.conf:/etc/nginx/nginx.conf:ro
|
||||
depends_on:
|
||||
- frontend
|
||||
- backend
|
||||
- minio
|
||||
networks:
|
||||
- app_network
|
||||
healthcheck:
|
||||
test: ["CMD", "nginx", "-t"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile.dev
|
||||
ports:
|
||||
- "8000:8000"
|
||||
env_file:
|
||||
- .env
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
environment:
|
||||
- DEBUG=1
|
||||
- PYTHONUNBUFFERED=1
|
||||
- MYSQL_SERVER=db
|
||||
- CHROMA_DB_HOST=chromadb
|
||||
- CHROMA_DB_PORT=8000
|
||||
- MINIO_ENDPOINT=minio:9000
|
||||
- NEO4J_URL=bolt://host.docker.internal:7687
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- ./uploads:/app/uploads
|
||||
networks:
|
||||
- app_network
|
||||
depends_on:
|
||||
- db
|
||||
- chromadb
|
||||
- minio
|
||||
restart: on-failure
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
delay: 5s
|
||||
max_attempts: 3
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile.dev
|
||||
environment:
|
||||
- WATCHPACK_POLLING=true
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
- NODE_ENV=development
|
||||
- NEXT_PUBLIC_API_URL=http://localhost/api
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
env_file:
|
||||
- .env
|
||||
networks:
|
||||
- app_network
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
db:
|
||||
image: mysql:8.0
|
||||
command: --default-authentication-plugin=mysql_native_password
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=root
|
||||
- MYSQL_DATABASE=ragagent
|
||||
- MYSQL_USER=ragagent
|
||||
- MYSQL_PASSWORD=ragagent
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
chromadb:
|
||||
image: chromadb/chroma:latest
|
||||
ports:
|
||||
- "8001:8000"
|
||||
volumes:
|
||||
- chroma_data:/chroma/chroma
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
environment:
|
||||
- MINIO_ROOT_USER=minioadmin
|
||||
- MINIO_ROOT_PASSWORD=minioadmin
|
||||
volumes:
|
||||
- minio_data:/data
|
||||
command: server --console-address ":9001" /data
|
||||
networks:
|
||||
- app_network
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
chroma_data:
|
||||
minio_data:
|
||||
|
||||
networks:
|
||||
app_network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user