diff --git a/README.md b/README.md index 14fa75d1..5aed3a45 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,16 @@ $ docker run -p 5000:5000 amundsendev/amundsen-metadata $ curl -v http://localhost:5000/healthcheck ``` +## Instructions to start the service from Docker image with gunicorn (production use case) +Note that there below command uses default config of gunicorn. Please visit [Gunicorn homepage](https://gunicorn.org/ "Gunicorn") for more information. +```bash +$ docker pull amundsendev/amundsen-metadata:latest +$ docker run -p 5000:5000 amundsendev/amundsen-metadata gunicorn --bind 0.0.0.0:5000 metadata_service.metadata_wsgi + +-- In different terminal, verify getting HTTP/1.0 200 OK +$ curl -v http://localhost:5000/healthcheck +``` + ## Production environment By default, Flask comes with Werkzeug webserver, which is for development. For production environment use production grade web server such as [Gunicorn](https://gunicorn.org/ "Gunicorn"). diff --git a/public.Dockerfile b/public.Dockerfile index fb401b8a..8c0c30e8 100644 --- a/public.Dockerfile +++ b/public.Dockerfile @@ -3,6 +3,6 @@ WORKDIR /app COPY . /app RUN pip3 install -r requirements.txt RUN python3 setup.py install +RUN pip3 install gunicorn -ENTRYPOINT [ "python3" ] -CMD [ "metadata_service/metadata_wsgi.py" ] +CMD [ "python3", "metadata_service/metadata_wsgi.py" ] diff --git a/setup.py b/setup.py index 33158d44..0e89cd6a 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -__version__ = '1.0.15' +__version__ = '1.0.16' setup(