[#2] master模块开发测试
This commit is contained in:
25
src/master/Dockerfile
Normal file
25
src/master/Dockerfile
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
ARG PIP_INDEX_URL=
|
||||
ENV PIP_NO_CACHE_DIR=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONPATH=/app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN set -euxo pipefail \
|
||||
&& python -m pip install --upgrade pip \
|
||||
&& if [[ -n "$PIP_INDEX_URL" ]]; then \
|
||||
PIP_INDEX_URL="$PIP_INDEX_URL" python -m pip install -r requirements.txt; \
|
||||
else \
|
||||
python -m pip install -r requirements.txt; \
|
||||
fi
|
||||
|
||||
COPY app ./app
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:3000", "app:create_app()"]
|
||||
Reference in New Issue
Block a user