feat: Add flexible port configuration for development
- Change default ports to 7510 (backend) and 7511 (frontend) to avoid conflicts - Add PORT environment variable support for both services - Create docker-compose.dev.yml for development without SSL/nginx - Add development script (scripts/dev.sh) for easy local development - Create comprehensive port configuration documentation - Update docker-compose.yml to support dynamic port configuration - Add frontend .env.example with development settings This allows running the application on custom ports internally without SSL, making it easier to integrate with existing infrastructure. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
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
|
||||
container_name: minio-webui-backend-dev
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
PORT: 7510
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
- "7510:7510"
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- /app/node_modules
|
||||
- ./logs:/app/logs
|
||||
- ~/.mc:/home/nodejs/.mc:ro
|
||||
depends_on:
|
||||
- redis
|
||||
networks:
|
||||
- minio-webui-network
|
||||
command: npm run dev
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: ../docker/Dockerfile.frontend.dev
|
||||
container_name: minio-webui-frontend-dev
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
PORT: 7511
|
||||
REACT_APP_API_URL: http://localhost:7510/api
|
||||
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
|
||||
|
||||
networks:
|
||||
minio-webui-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user