Last active
September 30, 2019 04:06
-
-
Save cloudbow/46b40ddaf6ac58701b26d4d81b374948 to your computer and use it in GitHub Desktop.
Gunicorn reload not working
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Introduction | |
I have created a Dockerfile which solves the problem of Gunicorn not doing relaods. It just needs the inotify tools as well as the | |
pip module. This solves the problem of reloading the fullstack couchbase python in PyCharm. | |
``` | |
FROM tiangolo/uvicorn-gunicorn:python3.7 | |
LABEL maintainer="Arun George <[email protected]>" | |
# Dependencies for Couchbase | |
RUN wget -O - http://packages.couchbase.com/ubuntu/couchbase.key | apt-key add - | |
RUN echo "deb http://packages.couchbase.com/ubuntu stretch stretch/main" > /etc/apt/sources.list.d/couchbase.list | |
RUN apt-get update && \ | |
apt-get install -y libcouchbase-dev libcouchbase2-bin build-essential | |
RUN apt-get install inotify-tools -y | |
COPY requirements.txt /tmp | |
RUN pip install --ignore-installed -r /tmp/requirements.txt | |
COPY ./app /app/app | |
COPY prestart.sh /app | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# Let the DB start | |
python /app/app/backend_pre_start.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dev/Development | |
poll | |
inotify | |
celery~=4.3 | |
passlib[bcrypt] | |
tenacity | |
requests | |
couchbase | |
nltk | |
emails | |
fastapi>=0.16.0 | |
uvicorn | |
gunicorn | |
sklearn | |
pyjwt | |
python-multipart | |
email_validator | |
jinja2 | |
boto3 | |
s3fs | |
awscli | |
mlflow==1.1.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment