♻️ Put api_server and db_updater scripts on the backend root

This commit is contained in:
2023-10-22 23:31:35 +02:00
parent 3434802b31
commit 0a7337a313
6 changed files with 9 additions and 6 deletions

View File

@@ -30,5 +30,7 @@ env VIRTUAL_ENV=/app/.venv \
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY api /app/api COPY api /app/api
COPY config.sample.yaml .
COPY api_server.py .
CMD ["python", "./api/main.py"] CMD ["./api_server.py"]

View File

@@ -35,6 +35,7 @@ env VIRTUAL_ENV=/app/.venv \
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY api /app/api COPY api /app/api
COPY db_updater /app/db_updater COPY config.sample.yaml .
COPY db_updater.py .
CMD ["python", "-m", "db_updater.fill_db"] CMD ["./db_updater.py"]

View File

@@ -12,9 +12,9 @@ from opentelemetry.sdk.resources import Resource, SERVICE_NAME
from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor from opentelemetry.sdk.trace.export import BatchSpanProcessor
from db import db from api.db import db
from dependencies import idfm_interface, redis_backend, settings from api.dependencies import idfm_interface, redis_backend, settings
from routers import line, stop from api.routers import line, stop
@asynccontextmanager @asynccontextmanager