Closed mschipperheyn closed 7 years ago
What is the best way to recover from this? I'm stuck. I cannot deploy the website anymore nor seem to have a clear path to undo what the plugin got done before failure occurred. E.g. how do I remove the 443 nginx website config? If I manually remove, it justs gets reconstituted when I run dokku proxy:ports-remove myapp http:443:5000
I'm not exactly sure what you did or how to fix it.. You should have just ran 3 commands and been done...
Ok, what I did was follow the recipe to the letter. My PORT.web.1 was 5000 however, not sure if that's the issue. I also have the wildcard in the domain names. Not sure if let's encrypt like's that
Lets Encrypt does not support wildcards yet. January they come to the CA, but tools won't adopt them for a while.
I believe web default port is 5000. So I think your wildcard messed up stuff.
The actual obvious issue is that
ssl_certificate /home/dokku/myapp/tls/server.crt;
ssl_certificate_key /home/dokku/myapp/tls/server.key;
were not created. I'm not an expert on Dokku, but perhaps there is a good way to manually create those? I tried the certbot but it fails because nginx won't start because of these issues.
I tried removing the ports so I can at least resume normal operation, but that also failed.
I also tried manually removing the 443 section in the nginx.conf but that just gets reconstituted when I run a dokku command.
I'm fairly sure the solution should be simple. I just don't really know what steps to follow safely without bringing down the live site.
Try using the cert
commands of the core dokku project to remove the certs and reset nginx so it restarts. Then try without wildcard.
Ok, yeah. This worked.
dokku proxy:ports-remove myapp 443
dokku domains:set myapp myapp.com.br www.myapp.com.br
dokku letsencrypt myapp
Thanks!
Awesome! No problem.
Some follow up suggestions without knowing enough about the inner workings.
PR's welcome.
I made a bit of a mistake during setup. I followed the recipe, but the port on my app was set to 5000 in stead of 5555, so I ran into issues when I tried to apply 5555. Duplicate entries etc.
I removed those but I cannot restart my app anymore because the tld directory is not there.
directory
letsencrypt/certs/09434hk24h2k342[some_code]
contains a config file with and nothing elseCan you guys give me some suggestions how to best revert the situation so I can try again
nginx.conf
nginx.conf.d/letsencrypt.conf