mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Implement real, working microservices architecture
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# WebRTC Service Dockerfile
|
||||
FROM backend/base:latest
|
||||
|
||||
# Copy service-specific files
|
||||
COPY backend/routes/webrtc.py /app/backend/routes/webrtc.py
|
||||
COPY backend/services/webrtc/main.py /app/backend/services/webrtc/main.py
|
||||
|
||||
# Set service name for entrypoint
|
||||
ENV SERVICE_NAME=webrtc
|
||||
|
||||
EXPOSE 8301
|
||||
@@ -0,0 +1,9 @@
|
||||
from fastapi import FastAPI
|
||||
from backend.routes.webrtc import router as webrtc_router
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = FastAPI(title="WebRTC Service")
|
||||
app.include_router(webrtc_router, prefix="/webrtc")
|
||||
|
||||
import os, uvicorn
|
||||
uvicorn.run(app, host="0.0.0.0", port=int(os.getenv("PORT", 8301)))
|
||||
Reference in New Issue
Block a user