Wouldn't it be easier for you to just use this pre-configured docker-container:
https://hub.docker.com/r/linuxserver/calibre-web
Especially if you want to expose the webserver to the internet, no one would be able to escape the virtualized server in case someone tries to take over the machine.