10605c6739
- Add setupProxy.js to proxy API calls to backend container - Install http-proxy-middleware for development proxy support - Update docker-compose.dev.yml to use backend service name - Add HOST=0.0.0.0 to allow external connections to dev server - Add empty favicon.ico to prevent 500 errors - Update proxy configuration to use port 7510 This fixes the ERR_CONNECTION_REFUSED errors when the frontend tries to connect to the backend API in Docker environment. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
85 lines
1.9 KiB
YAML
85 lines
1.9 KiB
YAML
version: '3.8'
|
|
|
|
# Development docker-compose file
|
|
# This configuration runs frontend and backend on custom ports without SSL/nginx proxy
|
|
# Usage: docker compose -f docker-compose.dev.yml up
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: ../docker/Dockerfile.backend.dev
|
|
container_name: minio-webui-backend-dev
|
|
restart: unless-stopped
|
|
environment:
|
|
NODE_ENV: development
|
|
PORT: 7510
|
|
LOG_DIR: /app/logs
|
|
TEMP_DIR: /app/temp
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "7510:7510"
|
|
volumes:
|
|
- ./backend/src:/app/src
|
|
- ./backend/package.json:/app/package.json
|
|
- ./backend/package-lock.json:/app/package-lock.json
|
|
- backend-logs:/app/logs
|
|
- backend-temp:/app/temp
|
|
- backend-node-modules:/app/node_modules
|
|
- ~/.mc:/home/node/.mc:ro
|
|
depends_on:
|
|
- redis
|
|
networks:
|
|
- minio-webui-network
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: ../docker/Dockerfile.frontend.dev
|
|
container_name: minio-webui-frontend-dev
|
|
restart: unless-stopped
|
|
environment:
|
|
PORT: 7511
|
|
BACKEND_URL: http://backend:7510
|
|
DANGEROUSLY_DISABLE_HOST_CHECK: 'true'
|
|
ports:
|
|
- "7511:7511"
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- minio-webui-network
|
|
stdin_open: true
|
|
tty: true
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: minio-webui-redis-dev
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- redis-data:/data
|
|
networks:
|
|
- minio-webui-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
volumes:
|
|
redis-data:
|
|
driver: local
|
|
backend-logs:
|
|
driver: local
|
|
backend-temp:
|
|
driver: local
|
|
backend-node-modules:
|
|
driver: local
|
|
|
|
networks:
|
|
minio-webui-network:
|
|
driver: bridge |