freeleaps-service-hub/apps/authentication/Dockerfile
Nicolas 5f8b6ed575 The log format of the central storage has been adjusted so that it can actively write corresponding logs to the log files.
Simultaneously upgraded the mirror versions of authentication and central storage.
2025-09-23 10:08:39 +08:00

36 lines
1.1 KiB
Docker

FROM python:3.12-slim
# docker settings
ARG CONTAINER_APP_ROOT="/app"
ENV APP_NAME="authentication"
ENV DEVSVC_WEBAPI_URL_BASE="http://devsvc:8007/api/devsvc"
ENV NOTIFICATION_WEBAPI_URL_BASE="http://notification:8003/api/notification/"
ENV JWT_SECRET_KEY="8f87ca8c3c9c3df09a9c78e0adb0927855568f6072d9efc892534aee35f5867b"
ENV JWT_ALGORITHM="HS256"
#site_settings
ENV SERVICE_API_ACCESS_HOST=0.0.0.0
ENV SERVICE_API_ACCESS_PORT=8004
ENV MONGODB_NAME=freeleaps2
ENV MONGODB_PORT=27017
ENV MONGODB_URI="mongodb://localhost:27017/"
#log_settings
ENV LOG_BASE_PATH=$CONTAINER_APP_ROOT/log/$APP_NAME
ENV BACKEND_LOG_FILE_NAME=$APP_NAME
ENV APPLICATION_ACTIVITY_LOG=$APP_NAME-activity
WORKDIR ${CONTAINER_APP_ROOT}
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY . ${CONTAINER_APP_ROOT}
EXPOSE ${SERVICE_API_ACCESS_PORT}
# Using shell to expand environemnt to enure pass the actual environment value to uvicorn
CMD uvicorn webapi.main:app --reload --port=$SERVICE_API_ACCESS_PORT --host=$SERVICE_API_ACCESS_HOST