initializer service deployed and tested
This commit is contained in:
28
api_services/api_builds/auth-service/Dockerfile
Normal file
28
api_services/api_builds/auth-service/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /
|
||||
|
||||
# Install system dependencies and Poetry
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gcc && rm -rf /var/lib/apt/lists/* && pip install --no-cache-dir poetry
|
||||
|
||||
# Copy Poetry configuration
|
||||
COPY /pyproject.toml ./pyproject.toml
|
||||
|
||||
# Configure Poetry and install dependencies with optimizations
|
||||
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root --only main && pip cache purge && rm -rf ~/.cache/pypoetry
|
||||
|
||||
# Copy application code
|
||||
COPY /api_services/api_initializer /api_initializer
|
||||
COPY /api_services/api_controllers /api_controllers
|
||||
COPY /api_services/schemas /schemas
|
||||
|
||||
COPY /api_services/api_middlewares /middlewares
|
||||
COPY /api_services/api_builds/auth-service/endpoints /api_initializer/endpoints
|
||||
COPY /api_services/api_builds/auth-service/events /api_initializer/events
|
||||
COPY /api_services/api_builds/auth-service/validations /api_initializer/validations
|
||||
|
||||
# Set Python path to include app directory
|
||||
ENV PYTHONPATH=/ PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Run the application using the configured uvicorn server
|
||||
CMD ["poetry", "run", "python", "/api_initializer/app.py"]
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
__all__ = []
|
||||
9
api_services/api_builds/auth-service/endpoints/index.py
Normal file
9
api_services/api_builds/auth-service/endpoints/index.py
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
endpoints_index: dict = {
|
||||
"Name": "d538deb4-38f4-4913-a1af-bbef14cf6873",
|
||||
"Slot1": "c0f5ccb1-1e56-4653-af13-ec0bf5e6aa51",
|
||||
"Slot2": "034a7eb7-0186-4f48-bb8c-165c429ad5c1",
|
||||
"Slot3": "ec1f3ec3-3f28-4eaf-b89a-c463632c0b90",
|
||||
"Slot4": "2cf99f10-72f0-4c2b-98be-3082d67b950d",
|
||||
"Slot5": "15c24c6c-651b-4c5d-9c2b-5c6c6c6c6c6c",
|
||||
}
|
||||
15
api_services/api_builds/auth-service/endpoints/routes.py
Normal file
15
api_services/api_builds/auth-service/endpoints/routes.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
|
||||
def get_routes() -> list[APIRouter]:
|
||||
return []
|
||||
|
||||
|
||||
def get_safe_endpoint_urls() -> list[tuple[str, str]]:
|
||||
return [
|
||||
("/", "GET"),
|
||||
("/docs", "GET"),
|
||||
("/redoc", "GET"),
|
||||
("/openapi.json", "GET"),
|
||||
("/metrics", "GET"),
|
||||
]
|
||||
3
api_services/api_builds/auth-service/events/__init__.py
Normal file
3
api_services/api_builds/auth-service/events/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
__all__ = []
|
||||
10
api_services/api_builds/auth-service/events/index.py
Normal file
10
api_services/api_builds/auth-service/events/index.py
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
events_index: dict = {
|
||||
"Slot1": "",
|
||||
"Slot2": "",
|
||||
"Slot3": "",
|
||||
"Slot4": "",
|
||||
"Slot5": "",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user