39 lines
1.1 KiB
Docker
39 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/"
|
|
|
|
# Freeleaps Auth Config
|
|
ENV AUTH_SERVICE_ENDPOINT=""
|
|
|
|
#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 |