4 ms·
Is the reason that nginx wouldn't start because you're specifying the certificate location in the config? So when it goes to start up it will fail because ther
by PuffinBlue 9y ago
Is the reason that nginx wouldn't start because you're specifying the certificate location in the config?
So when it goes to start up it will fail because ther is no certificate in place? (If not then tell me why Nginx won't start).
If that's the case, don't link to where the certificate should be. That'll let nginx start, then the certbot-nginx tool can run and it'll add links to the generated certificates directly to your config files as part of the initilisation.
All it does is insert the paths to the certificate files before the final closing bracket of any server block that listens on port 443.
I use Ansible and automate the install of new server/sites, unless there's something extra different with Docker, the automation process should still work fine. It also still works if your config is setup to redirect all incoming from port 80 to 443.
- sandGorgon 9y agoOne time run commands and dependent commands are difficult in docker init. So I have to fall back upon a startup manager like supervisord. I tried that last time , but it was very funky. Docker VM are like short lived machines with no dependency management in init. But 70$ for 3 years is a cheap price to pay versus giving up docker , nginx (vs traefik), etc
- PuffinBlue 9y agoStill, it seems unusual to not be able to run a set of commands on initialisation. I haven't looked at Docker in a long time, but isn't there something called an entryscript? I'm not sure I'm remembering the name correctly - - yep, entrypoint script not entryscript. I remember something about setting up Wordpress in Docker and the official docker image has this type of script that initialised the database just once. Might be worth looking into just for interest (maybe not for fixing this 'issue' as you point out its cheap to get a 3 year cert). I imagine one time init commands would be useful to have in their own right anyway.