Commit Graph

37 Commits

Author SHA1 Message Date
indra
d211c6bbc9 fix: missing export DOKKU_LIB_HOST_ROOT
Populates DOKKU_LIB_HOST_ROOT into /etc/default/dokku which is required
to enable plugins such as postgres to store data in the correct location.
2024-11-12 20:03:09 +11:00
Jose Diaz-Gonzalez
9ef0c35932 fix: ensure builder pruning works when running under docker 2024-10-20 23:43:50 -04:00
Jose Diaz-Gonzalez
35042af9ec chore: skip ssh key setup when starting docker image
When deploying the Dokku via Docker, ssh keys are added directly via the ssh-keys:add command, and thus we can skip this step completely (as there won't be a public key in that path).
2024-10-19 01:00:13 -04:00
Jose Diaz-Gonzalez
097fb4d819 feat: clear out docker builder cache once a day
There have been a number of tickets in the past - most recently #7061 - covering the fact that Dokku doesn't clean up disk utilization. The underlying issue is that Docker uses build cache that cannot be cleaned up in a targeted way - and usually doesn't even respect the builder gc settings in a way that makes sense. In fact, the computed disk space does not line up with actual disk utilization, causing it to be a mystery to anyone investigating the underlying problem.

This change introduces a cron-based mechanism that cleans up disk once a day. Cleaning up more often would potentially cause issues during a build if for some reason the prune and an app deploy happened at the same time - its not clear if there is a lock on build cache usage - so cleaning up after hours once a day is a decent tradeoff.

In the future, this setting may be modifiable, but it works well for now.

Closes #7061
2024-09-22 22:15:08 -04:00
Jose Diaz-Gonzalez
80fb3fea08 fix: run core install triggers to force create any folders that may be missing 2024-09-21 17:20:20 -04:00
Jose Diaz-Gonzalez
bbff88a8fb fix: run dokku commands after setting dokku env vars 2024-09-21 17:20:20 -04:00
Jose Diaz-Gonzalez
7334692d00 fix: correct sudoers.so file location on ubuntu noble 2024-09-21 17:20:19 -04:00
Jose Diaz-Gonzalez
5493ca5978 fix: force sv usage in docker container to avoid cases where systemd is used instead
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.
2024-09-21 17:20:19 -04:00
Jose Diaz-Gonzalez
8a6c22ad6c fix: ensure UsePAM is on to enable sshcommand usage 2024-09-21 17:20:19 -04:00
Jose Diaz-Gonzalez
b24d5f497d feat: disable password authentication to dokku docker container
This is insecure and isn't necessary as the container is only used for push-based deployment.
2024-09-21 17:20:19 -04:00
Jose Diaz-Gonzalez
53f209b307 chore: vendor sshd_config file
This will allow better diffing once features are enabled/disabled.
2024-09-21 17:20:19 -04:00
Jose Diaz-Gonzalez
08cf35aa36 fix: remove the need for executing crontab as root
This was done by design previously - to fix an issue with RHEL not allowing running crontab as the current user - but is no longer necessary with the removal of non-Debian platform support.
2024-03-06 09:36:48 -05:00
Jose Diaz-Gonzalez
f33d7f129b feat: warn when incorrect interface/port in use for web processes
Users that misconfigure their process's listening interface or port will now see an additional healthcheck warning for web deploys. While only a single port is checked, this ensures that users at least have some context as to why their app isn't responding as expected.

Closes #4798
2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
26e9cc9b8c feat: add support for non-web healthchecks via app.json
This change converts existing CHECKS files into a healthchecks key that is understood by 'docker-container-healthchecker'. This tool supports a number of different types of container healthchecks - command, http, uptime - and can perform healthchecks against non-web processes.

The use of the old CHECKS file is now deprecated, and will be removed in the next minor version. Users can use the 'docker-container-healthchecker' to convert existing CHECKS files to the new format automatically.

Closes #2760
2023-08-06 17:23:13 -04:00
Ronald Ip
08f38892af Fix issue with docker plugin-list install failing boot for docker-based installations 2023-07-14 11:45:17 +08:00
Jose Diaz-Gonzalez
dc84545982 fix: properly set the plugin repository name when installing in a docker-based dokku install 2023-07-08 03:51:06 -04:00
Michael Mulley
1f29fa6f9e fix: docker plugin-list install
See dokku/dokku#5929
2023-06-14 13:00:51 -04:00
josegonzalez
54d88eec7e fix: only rsync existing directories
Additionally, pin the chown to just the top-level dir for the services dir
2023-02-17 19:10:14 -05:00
josegonzalez
7834f353f1 fix: ensure the services directory also exists
Without this, we get issues attempting to install datastore plugins.

Closes #5614
2023-02-16 19:38:10 -05:00
Jose Diaz-Gonzalez
ef32d2d88f fix: do not attempt to reinstall already installed plugins
Instead, just warn that they won't be reinstalled.

Closes #5549
2023-01-12 21:03:03 -05:00
Jose Diaz-Gonzalez
257baa1d46 refactor: run crontab under sudo to support rhel systems
RHEL blocks users from executing crontab as themselves Because Of Reasons so we need to use sudo instead.

Also refactors file writing to properly support writing the permissions on sudoers files going forward.

Closes #5020
2022-02-27 19:17:04 -05:00
Jose Diaz-Gonzalez
ea86a9f2ca fix: ensure pack is run as root user when building apps in docker
Without this, using the pack builder fails since it cannot communicate with a root-mounted docker socket.
2021-10-06 03:07:40 -04:00
Jose Diaz-Gonzalez
9a1a97d56f docs: document DOKKU_HOST_ROOT 2021-10-03 19:45:06 -04:00
Jose Diaz-Gonzalez
44caf44ce6 fix: set the DOKKU_HOST_ROOT on docker container start
Without this change, cache doesn't work when running in a docker container.
2021-10-03 19:44:44 -04:00
Jose Diaz-Gonzalez
c725506d63 fix: correct permissions for userns support
Closes #4746
2021-09-04 02:38:31 -04:00
Jose Diaz-Gonzalez
9306011f70 fix: do not retag images unnecessarily
This change minimizes the work needed to be done when tagging images. It edits the image manifest directly only when necessary, allowing restarts of an app to avoid having an extra layer.

This also additionally allows to deploy images with ONBUILD directives without running the ONBUILD directives.

Lastly, users building docker images that run Dokku will need to use a new sudoer wrapper for the `docker-image-labeler` binary to work correctly. A reference version has been placed in the `docker` skeleton directory.

Closes #3931
Refs #4226
2021-01-24 02:09:53 -05:00
Jose Diaz-Gonzalez
3b248de306 fix: do not logrotate all services files
Closes #3929
2020-05-06 00:59:37 -04:00
Jose Diaz-Gonzalez
6e3fddb544 feat: add proper openresty support
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
2019-09-16 03:05:35 -04:00
Michael Hobbs
8830e15526 use custom docker bin 2019-07-18 00:27:09 -04:00
Jose Diaz-Gonzalez
ecfb54c668 refactor: switch to /mnt/dokku 2019-07-18 00:24:24 -04:00
Jose Diaz-Gonzalez
a568965d14 fix: run shfmt 2019-07-18 00:24:24 -04:00
Jose Diaz-Gonzalez
ea32544e37 feat: set the debconf value for the global hostname 2019-07-18 00:24:24 -04:00
Jose Diaz-Gonzalez
9b67ffe9d4 feat: properly handle dhparam
The dhparam file should be specific to each installation, and thus needs to be generated on first run.
2019-07-18 00:24:24 -04:00
Jose Diaz-Gonzalez
6fe984fd3c fix: ensure releases take docker-based installation into account when updating version numbers 2019-07-18 00:24:24 -04:00
Jose Diaz-Gonzalez
d7bb131b37 feat: add the ability to install arbitrary plugins on container start 2019-07-18 00:24:23 -04:00
Jose Diaz-Gonzalez
01f317bbf3 feat: initialize plugins on boot 2019-07-18 00:24:23 -04:00
Jose Diaz-Gonzalez
3eb9c9b3ba feat: initial docker installation support
Refs #1076
2019-07-18 00:24:23 -04:00