freeleaps-service-hub/apps/content/Dockerfile

39 lines
1.0 KiB
Docker

FROM python:3.12-slim
# docker settings
ARG CONTAINER_APP_ROOT="/app"
ENV APP_NAME="content"
ENV FREELEAPS_WWW_AS_AZURE_CLIENT_SECRET="jTu8Q~WceiK-5dfZB44Ww-K4fVGi3_5tHNWYYbdX"
ENV CENTRAL_STORAGE_WEBAPI_URL_BASE="http://central_storage:8005/api/central_storage/"
#site_settings
ENV SERVICE_API_ACCESS_HOST=0.0.0.0
ENV SERVICE_API_ACCESS_PORT=8013
ENV MONGODB_NAME="freeleaps2"
ENV MONGODB_URI="mongodb://freeleaps2-mongodb: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