flask_nginx_2
README.md
Flask + Gunicorn with balancer Nginx on docker-compose
Setup
Install docker-compose, git and curl:
sudo apt update
sudo apt upgrade -y
sudo apt install docker-compose git curl -y
sudo chmod +x /usr/local/bin/docker-compose
Import git
Import git and moving to directory:
git clone https://gitverse.ru/sc/nero/flask_nginx_2.git
cd flask_nginx_2
Start
Start docker-compose:
sudo docker-compose up --build -d
or:
sudo docker-compose up --build
Checking HTTPS
We copy the certificate from the container:
sudo docker cp flask_nginx_2_loadbalancer_1:/etc/nginx/server.crt /usr/local/share/ca-certificates/
Run to update the list of trusted certificates:
sudo update-ca-certificates
Add host:
chmod +x host.sh
sudo ./host.sh
Checking ssl/tls:
curl -s -L https://flask.com && echo
If output like:
Hello, World!
Then you did it right!