Reputation: 3843
My dockerfile consists of these lines, in order to start up a flask server:
ENTRYPOINT ["python3"]
CMD ["/root/server.py"]
How would i have to modify these lines, in order to start a Gunicorn server?
Upvotes: 1
Views: 493
Reputation: 855
Create a boot.sh
Script to your Project with the following content:
gunicorn -b :5000 <name_of_your_app_file>:<name_of_your_app>
Then change the ENTRYPOINT
to ['./boot.sh']
EDIT:
You can run it in the Dockerfile like this:
ENTRYPOINT['gunicorn', '-b :5000', 'app:app']
Upvotes: 1