21 lines
506 B
Docker
21 lines
506 B
Docker
FROM python:3-alpine
|
|
|
|
# Set environment variables (these can be overridden in `docker-compose.yml` or `docker run`)
|
|
ENV FILE_DIRECTORY="/mnt/storage/files/"
|
|
ENV HOST="127.0.0.1"
|
|
ENV PORT="5000"
|
|
ENV DEBUG="True"
|
|
ENV WORKERS="4"
|
|
|
|
# Expose the port Flask will run on
|
|
EXPOSE 5000
|
|
|
|
WORKDIR /opt/ole
|
|
COPY . .
|
|
|
|
RUN pip install --no-cache --upgrade pip
|
|
RUN pip install --no-cache -r requirements.txt
|
|
|
|
# Start the Flask app
|
|
#CMD ["python", "app.py"]
|
|
CMD ["sh", "-c", "gunicorn -w $WORKERS -b $HOST:$PORT app:app"]
|