Hello! My hoster is only accepting Docker images. It will map any port to :40xxx. I can access my flask app on http.
Last hoster I just used nginx with cert.pem and key.pem. I tried to include nginx into Dockerfile but only got default startpage even
services:
nginx:
volumes: -./nginx.conf:/etc/ngvinx/nginx.conf
but its in docker-compose.yml and it seems not to be included in docker build images. So I tried using gunicorn for reverse proxy which returns something like SSL_INSECURE and can't the mapped :40xxx port in https but works in http
What is the best approach? Hoster options are limited, my knowledge too... I tried some tutorials but can not get SSL working. If I choose Hoster SSH options, I can connect with PuTTY but I don't get a public IP to access. Other option is using Docker Repo
I don't understand how to implement the docker-compose yml when I can only use 1 Docker image or how to include certbot into the docker image. Do I have to create a run.sh to run certbot and then start gunicorn? Since every port (:443) is mapped to a :40xxx port can I even use SSL on the mapped port?
Sorry it's very beginner questions. I tried to google but didn't find a solution. Hope you can help me understand.
My domain is: vast ai
I ran this command: sudo certbot certonly -d domain.com -n --standalone with docker options CMD ["python3", "-m", "gunicorn", "-w", "4", "-b", 0.0.0.0:5000", "--certfile", "/etc/letsencrypt/live/domain.com/fullchain.pem","--keyfile","/etc/letsencrypt/live/domain.com/privkey.pem","app:app","--timeout","120"] . also tried services: certbot: image: certbot/certbot in Dockerfile
It produced this output: SSL_INSECURE, only http:// working
My web server is (include version): gunicorn, nginx
The operating system my web server runs on is (include version): python:3.7-slim
My hosting provider, if applicable, is: vast ai
I can login to a root shell on my machine (yes or no, or I don't know): no
I'm using a control panel to manage my site: no
The version of my client is: 2.11.0