chore(deployment): add docker-compose and nginx setup for production
- Added Dockerfile and nginx.conf for frontend production build. - Added docker-compose.yml to orchestrate backend and frontend. - Updated geminiService.ts to support relative API paths via Nginx proxy. - Updated documentation with deployment instructions for Synology/Docker.
This commit is contained in:
38
docker-compose.yml
Normal file
38
docker-compose.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: market-intel-backend
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# Persist Logs
|
||||
- ./Log:/app/Log
|
||||
# API Keys & Config (Bind Mounts for easy editing)
|
||||
- ./gemini_api_key.txt:/app/gemini_api_key.txt
|
||||
- ./serpapikey.txt:/app/serpapikey.txt
|
||||
- ./config.py:/app/config.py
|
||||
# Optional: Mount Python script for hot-reloading logic changes
|
||||
- ./market_intel_orchestrator.py:/app/market_intel_orchestrator.py
|
||||
environment:
|
||||
- PYTHONUNBUFFERED=1
|
||||
# Backend port is internal-only, accessed by frontend via Docker network
|
||||
expose:
|
||||
- "3001"
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./general-market-intelligence
|
||||
dockerfile: Dockerfile
|
||||
container_name: market-intel-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
# Expose Frontend to Host (Synology)
|
||||
# Access via http://<Synology-IP>:8085
|
||||
- "8085:80"
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
# Optional: Define a specific network if needed, otherwise 'default' is fine.
|
||||
Reference in New Issue
Block a user