freeleaps-service-hub/apps/central_storage/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

40 lines
1.1 KiB
Docker

FROM python:3.12-slim
# docker settings
ARG CONTAINER_APP_ROOT="/app"
ENV APP_NAME="central_storage"
ENV AZURE_STORAGE_DOCUMENT_API_KEY="Cg+wtKpHt6Bo6bTUtjic40cRNRZ8NCI3JYBY69BNPgFJARVx/c18iVC7cASbJfzukyu4pksyhUep+AStFdpH7Q=="
ENV AZURE_STORAGE_DOCUMENT_API_ENDPOINT="https://freeleaps1document.blob.core.windows.net/"
#site_settings
ENV SERVICE_API_ACCESS_HOST=0.0.0.0
ENV SERVICE_API_ACCESS_PORT=8005
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}
#RUN apt update
#RUN apt install -y netcat
#RUN ln -s /bin/bash /usr/bin/bash
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