Docker Setup
Complete guide for deploying UIP - Urban Intelligence Platform using Docker and Docker Compose.
📦 Overview
Docker Compose provides a streamlined way to deploy the entire UIP stack with a single command. This includes:
- Backend API Server (FastAPI)
- Frontend Web Application (React + Vite)
- Neo4j Graph Database
- MongoDB Document Database
- Redis Cache
- NGSI-LD Context Broker (Stellio)
- Apache Jena Fuseki (RDF Triplestore)
🚀 Quick Start
1. Clone the Repository
git clone https://github.com/UIP-Urban-Intelligence-Platform/UIP-Urban_Intelligence_Platform.git
cd UIP-Urban_Intelligence_Platform
2. Start All Services
docker-compose up -d
3. Verify Services
docker-compose ps
Expected output:
NAME STATUS PORTS
uip-backend Up 0.0.0.0:8001->8001/tcp
uip-frontend Up 0.0.0.0:5173->5173/tcp
uip-neo4j Up 0.0.0.0:7474->7474/tcp, 0.0.0.0:7687->7687/tcp
uip-mongo Up 0.0.0.0:27017->27017/tcp
uip-redis Up 0.0.0.0:6379->6379/tcp
🔧 Configuration
Environment Variables
Create a .env file in the project root:
# Application
APP_ENV=production
DEBUG=false
# API Configuration
API_HOST=0.0.0.0
API_PORT=8001
# Database URLs
MONGO_URI=mongodb://mongo:27017/hcmc_traffic
NEO4J_URI=bolt://neo4j:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_secure_password
# Redis
REDIS_URL=redis://redis:6379
# Context Broker
STELLIO_URL=http://stellio:8080
FUSEKI_URL=http://fuseki:3030
Docker Compose Override
For development, create docker-compose.override.yml:
version: '3.8'
services:
backend:
volumes:
- ./src:/app/src:ro
environment:
- DEBUG=true
command: ["uvicorn", "src.api.main:app", "--reload", "--host", "0.0.0.0", "--port", "8001"]
frontend:
volumes:
- ./apps/traffic-web-app/frontend/src:/app/src:ro
command: ["npm", "run", "dev", "--", "--host"]