refactor v2
This commit is contained in:
@@ -5,5 +5,11 @@ ENV PYTHONUNBUFFERED=1
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY . .
|
||||
# Expose dynamic port
|
||||
EXPOSE 8798
|
||||
CMD ["python", "app.py"]
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK CMD python -c "import requests; r=requests.get('http://localhost:${FLASK_PORT:-8798}',timeout=5);exit(0 if r.ok else 1)" || exit 1
|
||||
|
||||
ENV FLASK_PORT=${FLASK_PORT:-8798}
|
||||
CMD ["sh", "-c", "gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 --threads 16 --bind 0.0.0.0:$FLASK_PORT --timeout 60 app:app"]
|
||||
Reference in New Issue
Block a user