feat(smart-app): add Docker web build + Traefik integration
This commit is contained in:
@@ -1,9 +1,32 @@
|
||||
# Smart App City — Docker Compose
|
||||
# Smart App City — Docker Compose (Web + Backend)
|
||||
|
||||
version: "3.8"
|
||||
|
||||
networks:
|
||||
smartcity-shared:
|
||||
external: true
|
||||
traefik-public:
|
||||
external: true
|
||||
|
||||
services:
|
||||
# API Gateway
|
||||
# ─── 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
|
||||
@@ -12,13 +35,19 @@ services:
|
||||
environment:
|
||||
- KEYCLOAK_URL=http://openremote-keycloak:8080/auth
|
||||
- LOCALAI_URL=http://localai-api:8080
|
||||
- QDRANT_URL=http://qdrant:***
|
||||
- QDRANT_URL=http://qdrant:6333
|
||||
- REDIS_URL=redis://redis:6379
|
||||
networks:
|
||||
- smartcity-shared
|
||||
restart: always
|
||||
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 ───
|
||||
rag-service:
|
||||
build: ./ai/rag-service
|
||||
container_name: smartapp-rag
|
||||
@@ -26,15 +55,15 @@ services:
|
||||
- "8001:8001"
|
||||
environment:
|
||||
- LOCALAI_URL=http://localai-api:8080
|
||||
- QDRANT_URL=http://qdrant:***
|
||||
- QDRANT_URL=http://qdrant:6333
|
||||
- EMBEDDING_MODEL=intfloat/multilingual-e5-large
|
||||
networks:
|
||||
- smartcity-shared
|
||||
depends_on:
|
||||
- api-gateway
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
|
||||
# Agent Service
|
||||
# ─── Agent Service ───
|
||||
agent-service:
|
||||
build: ./ai/agent-service
|
||||
container_name: smartapp-agent
|
||||
@@ -47,9 +76,9 @@ services:
|
||||
- smartcity-shared
|
||||
depends_on:
|
||||
- rag-service
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
|
||||
# Qdrant (if not existing)
|
||||
# ─── Qdrant Vector DB ───
|
||||
qdrant:
|
||||
image: qdrant/qdrant:v1.9.0
|
||||
container_name: smartapp-qdrant
|
||||
@@ -59,9 +88,9 @@ services:
|
||||
- qdrant_data:/qdrant/storage
|
||||
networks:
|
||||
- smartcity-shared
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
|
||||
# Meilisearch (if not existing)
|
||||
# ─── Meilisearch ───
|
||||
meilisearch:
|
||||
image: getmeili/meilisearch:v1.7
|
||||
container_name: smartapp-search
|
||||
@@ -71,11 +100,7 @@ services:
|
||||
- meilisearch_data:/meili_data
|
||||
networks:
|
||||
- smartcity-shared
|
||||
restart: always
|
||||
|
||||
networks:
|
||||
smartcity-shared:
|
||||
external: true
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
qdrant_data:
|
||||
|
||||
Reference in New Issue
Block a user