How to install:
- sudo apt-get install python3-pip
- sudo pip3 -V
- sudo pip3 install -r requirements.txt
OR
- sudo pip3 install --user flask
- sudo pip3 install gunicorn
Then:
sudo gunicorn -w 4 --reload -b localhost:5000 "app.main:create_app(testing=False)"
In a root folder:
docker build --tag flask-app .
docker run -p 5000:5000 --net="host" flask-app
How to install docker-compose: https://docs.docker.com/compose/install/
In a root folder run: docker-compose build && docker-compose up
While the container is running:
- docker ps
- docker exec -it [name of your container] sh