On newer Ubuntu Noble, cron (among other things) has a transitory dependency on systemd, forcing our systemd/runit detection to fail. This change allows overriding the detected init on Ubuntu systems, ensuring we always do the right thing when interacting with init.
In most cases, it should be there, but it appears that system upgrades from Ubuntu 16.04 sometimes do not have usr-merge setup. As such, we need to fallback to the /bin/systemctl path if it exists.
This will allow users to switch to a docker label-based nginx proxy server transparently without rebuilds (after the first one), which would mimic how the caddy, haproxy, and traefik proxy implementations work.
See https://github.com/dokku/nginx-docker-proxy for an example server implementation.
The previous method was a bit more difficult for users to interact with as they needed to ensure the file was at a certain path in the built image. This change divorces the file from the built artifact, better aligning the nginx.conf.sigil handling with the rest of Dokku's monorepo support.
A side effect of this is now building proxy configurations does not require access to the built image.
Closes#5207
We will no longer support CentOS, Fedora, and Opensuse as installation targets. These are not actively maintained by anyone with commit rights and occasionally cause issues for users as they are not tested during the release process.
Rather than have subpar support for an untested operating system, we're removing support for them completely. Users of these operating systems should take a look migration to the docker-based installation method, which will always be tested and supported by the project.
Additionally, drop support for Debian 9 as it is now EOL.
The default for an app is empty, meaning it will fallback to the global value (which defaults to true). This will allow users to properly override the global value, regardless of what it is.
Unfortunately, Docker does not persist container IPs on boot, so containers may come up with the wrong IP, resulting in proxying to the incorrect app after a server restart. Instead, we should delete the configs and let ps:restore rebuild the proxy config correctly.
Closes#3932
This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
This enables the HSTS header by default when an SSL certificate is in use. HSTS options can also be managed via the nginx:set command, which also exposes the ability to disable HSTS for your application.
This change allows supporting the openresty package as installed on Ubuntu 18.04 from the official openresty package repository, while also returning general nginx support.
Closes#3675
This will allow background processes to cleanup these files if they were unable to be cleaned up during a run of the dokku binary, as is the case for files copied by the docker binary when running in docker.
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.
The command used to reprocess everything is:
```shell
shfmt -l -bn -ci -i 2 -w .
```
- expose an nginx:validate command that can be used to show validation information
- properly reference the invalid nginx config, rather than tell the user that another app's nginx config is invalid when deploying their own app
- allow a user to cleanup bad nginx config files out of band when they are blocking a deploy _without_ requiring knowing where that nginx config is
Note that this may have issues with generated nginx.conf files that depend on other apps or other parts of the nginx config. For now, this is acceptable, though it is something that needs to be field tested.
Closes#3162
This will allow us to kill stale proxy configuration within apps, which is critical during application renames.
- redirect rmdir output to dev-null
- trigger a proxy-clear-config (new trigger) when renaming an application
- The configuration will be rebuilt during the later `ps_rebuild`
Closes#3231