feat(integrations): setup integrations service structure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1
services/integrations/app/__init__.py
Normal file
1
services/integrations/app/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# Integrations Service
|
||||
22
services/integrations/app/config.py
Normal file
22
services/integrations/app/config.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# Odoo Connection
|
||||
ODOO_URL: str = ""
|
||||
ODOO_DB: str = ""
|
||||
ODOO_USER: str = ""
|
||||
ODOO_API_KEY: str = ""
|
||||
|
||||
# Internal Services
|
||||
API_GATEWAY_URL: str = "http://localhost:8000"
|
||||
FLOW_ENGINE_URL: str = "http://localhost:8001"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
17
services/integrations/app/main.py
Normal file
17
services/integrations/app/main.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
app = FastAPI(title="WhatsApp Central - Integrations Service")
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
def health_check():
|
||||
return {"status": "healthy", "service": "integrations"}
|
||||
Reference in New Issue
Block a user