This repository has been archived by the owner on Sep 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Deployment
Daniel Däschle edited this page Feb 13, 2018
·
3 revisions
Installing gunicorn on linux with pip3 install gunicorn
.
Using it with: gunicorn -w 4 -b 0.0.0.0:4000 app:application
This line means 4 threads on public domain with port 4000 using the application in app.py
.
A basic docker file can looks like this:
FROM python:3.6.4-alpine3.7
WORKDIR /app
ADD . /app
RUN pip install -r requirements.txt
CMD ["gunicorn", "-w 4", "-b 0.0.0.0:4000", "app:application"]
For more information how to use Docker see this.
Deployment in swapy is the same like in Flask because it uses the same backend (werkzeug). You can read more about it here: Flask Deploying