Files
smart-city-digital-twin-mar…/smart-app-city/docker-compose.yml

108 lines
2.8 KiB
YAML

# Smart App City — Docker Compose (Web + Backend)
version: "3.8"
networks:
smartcity-shared:
external: true
traefik-public:
external: true
services:
# ─── Web Frontend (Expo React Native Web) ───
smartapp-web:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: smartapp-web
networks:
- smartcity-shared
- traefik-public
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.smartapp-web.rule=Host(`smartapp.digitribe.fr`)"
- "traefik.http.routers.smartapp-web.entrypoints=websecure"
- "traefik.http.routers.smartapp-web.tls.certresolver=letsencrypt"
- "traefik.http.services.smartapp-web.loadbalancer.server.port=80"
# ─── API Gateway ───
api-gateway:
build: ./backend/api-gateway
container_name: smartapp-gateway
ports:
- "8000:8000"
environment:
- KEYCLOAK_URL=http://openremote-keycloak:8080/auth
- LOCALAI_URL=http://localai-api:8080
- QDRANT_URL=http://qdrant:6333
- REDIS_URL=redis://redis:6379
networks:
- smartcity-shared
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.smartapp-api.rule=Host(`api-smartapp.digitribe.fr`)"
- "traefik.http.routers.smartapp-api.entrypoints=websecure"
- "traefik.http.routers.smartapp-api.tls.certresolver=letsencrypt"
- "traefik.http.services.smartapp-api.loadbalancer.server.port=8000"
# ─── RAG Service ───
rag-service:
build: ./ai/rag-service
container_name: smartapp-rag
ports:
- "8001:8001"
environment:
- LOCALAI_URL=http://localai-api:8080
- QDRANT_URL=http://qdrant:6333
- EMBEDDING_MODEL=intfloat/multilingual-e5-large
networks:
- smartcity-shared
depends_on:
- api-gateway
restart: unless-stopped
# ─── Agent Service ───
agent-service:
build: ./ai/agent-service
container_name: smartapp-agent
ports:
- "8002:8002"
environment:
- LOCALAI_URL=http://localai-api:8080
- RAG_URL=http://rag-service:8001
networks:
- smartcity-shared
depends_on:
- rag-service
restart: unless-stopped
# ─── Qdrant Vector DB ───
qdrant:
image: qdrant/qdrant:v1.9.0
container_name: smartapp-qdrant
ports:
- "6333:6333"
volumes:
- qdrant_data:/qdrant/storage
networks:
- smartcity-shared
restart: unless-stopped
# ─── Meilisearch ───
meilisearch:
image: getmeili/meilisearch:v1.7
container_name: smartapp-search
ports:
- "7700:7700"
volumes:
- meilisearch_data:/meili_data
networks:
- smartcity-shared
restart: unless-stopped
volumes:
qdrant_data:
meilisearch_data: