TheHipbot / docker-web2py

web2py Docker files
13 stars 11 forks source link

Making this work with a valid cert #3

Closed absolutejam closed 7 years ago

absolutejam commented 7 years ago

Hey,

I've tried simply mounted my own cert directory over the top of the /etc/nginx/ssl directory (To replace the .crt and .key file) but the pages aren't accessible when doing this. Is there a quick and easy way to get up and running with a valid cert?

Thanks.

absolutejam commented 7 years ago

Okay, HTTP is serving just fine when I overwrite the .key and .crt file, but HTTPS isn't. If I wget 127.0.0.1:443 from inside the container, I just get 'ERROR 400: Bad Request', but netstat -antu shows that the container is listening on port 443.

Is this because I don't have a .info file?

absolutejam commented 7 years ago

Nevermind, user error! Looks like my reverse proxying was bad. I had an issue originally with the certs which I resolved and then the second issue was unrelated.

absolutejam commented 7 years ago

Just for information, my docker-compose.yml overwrites the /etc/nginx/ssl folder with one stored on the host machine.

version: '2'

services:
  web2py:
    image: thehipbot/web2py
    expose:
      - 8000
      - 443
      - 80
    volumes:
      - "./ssl:/etc/nginx/ssl:ro"
    network_mode: "bridge"

and I have an nginx container also on the same network that is linked to this container and proxies requests across.