Bot_test / Dockerfile
Futuresony's picture
Update Dockerfile
eecc40d verified
raw
history blame
941 Bytes
FROM python:3.10
# Use a Python version compatible with your packages
WORKDIR /app
# Copy requirements.txt first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy your application code and other necessary files
COPY app.py .
# COPY your_service_account_file.json . # If you use a JSON file instead of base64 secret
# If you need to download spacy models or other assets on build
# RUN python -m spacy download en_core_web_sm # Uncomment if you need this model
# Command to run your Flask application using a production-ready WSGI server like Gunicorn
# This assumes your Flask application instance is named 'app' in 'app.py'
# It binds to the PORT environment variable provided by the hosting environment.
# Provide a default port (e.g., 7860) if the PORT environment variable is not set.
CMD exec gunicorn --bind 0.0.0.0:${PORT:-7860} --workers 1 --threads 8 --timeout 0 app:app