Commit Graph

53 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
1733b8ec81 fix: ensure the /etc/docker exists when interacting with it via postinst 2025-12-22 13:19:30 -05:00
Jose Diaz-Gonzalez
247d522b7e feat: enable live-restore by default when installing Dokku
This will help users have more seamless upgrades in the future in cases where docker is restarted.
2025-11-22 20:25:22 -05:00
Jose Diaz-Gonzalez
e394776c3b fix: drop deprecated aufs check
Closes #8102
2025-11-16 18:52:19 -05:00
Jose Diaz-Gonzalez
314521cbca fix: scope the delete of symlinked plugins in debian post-install to the plugin folders
Previously, we would try and traverse the entire dokku lib directory, causing extremely slow updates for installations with lots of data. This would also potentially cause issues for anyone using symlinks in their data directories.

Instead, just remove symlinks in the plugin directories.
2023-12-25 14:29:11 -05:00
Jose Diaz-Gonzalez
dac566e75e refactor: move all shellcheck disable definitions to .shellcheckrc file
This makes standard use of shellcheck work without needing to provide extra configuration anywhere.

Also remove use of inline 'shellcheck disable' calls that are already defined in the .shellcheckrc and don't need to be set inline.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
28027b9a78 chore: run shfmt 2022-12-26 16:41:45 -05:00
Jose Diaz-Gonzalez
c68ae008cc fix: ensure permissions for global VHOST file are set to the dokku user on install 2022-05-10 12:44:01 -04:00
Jose Diaz-Gonzalez
9f326b3f28 fix: respect debconf selections where possible
This will continue to not override anyone's global domain preferences, but will at least ensure we set the domain prior to the default injected in 00_dokku-standard#install.

Closes #4065
2021-08-07 19:25:01 -04:00
Jose Diaz-Gonzalez
a1c768b9b3 refactor: drop web installer in favor of setup via cli
This makes the installation a bit more secure by ensuring a user does not accidentally expose a way for unauthorized users to add new ssh keys to the system.

Additionally, this removes the extra HOSTNAME file to make the initial install process easier (that file was not modifiable by any dokku commands.

Closes #2247
2021-08-07 16:36:41 -04:00
Jose Diaz-Gonzalez
f9deab94f9 fix: remove empty plugin directories during upgrade
Closes #4593
2021-05-23 17:37:08 -04:00
Jose Diaz-Gonzalez
e19b52442b fix: remove deprecated egrep calls from codebase 2020-02-17 05:59:52 -05:00
Jose Diaz-Gonzalez
50863a9b76 fix: detect correct python binary to use
Ideally python usage goes away - the dokku-installer should become a mandatory cli command, and the plugin is rewritten in golang - but for now, we need to use the correct binary when running dokku.

Closes #3714
2019-10-17 14:24:47 -04:00
Jose Diaz-Gonzalez
a9ce738f68 feat: add openresty and runit support to packaging
Our docker image uses runit instead of init/systemd, hence the added sv support on Ubuntu operating systems.
2019-09-16 03:03:20 -04:00
Jose Diaz-Gonzalez
5506c9e27d refactor: use version in DOKKU_LIB_ROOT
The version in DOKKU_ROOT may be incorrect for docker-based installs if that directory is mounted from an external volume. Instead, pull it from the DOKKU_LIB_ROOT directory, and respect the STABLE_VERSION if specified (VERSION will be the entire version, including commit sha).
2019-08-13 00:53:49 -04:00
Jose Diaz-Gonzalez
4ab30b8c14 chore: unify deb and rpm creation code
- split things into functions
- port code that handled postinst on deb to rpm and vice-versa
2019-08-08 15:18:00 -04:00
Michael Hobbs
d8ada6a6e9 install dokku from built deb package and use docker image for integrations tests 2019-07-18 00:26:31 -04:00
Jose Diaz-Gonzalez
6b42fde028 fix: handle case where modprobe does not exist
This is possible when installing dokku within a docker image.
2019-07-18 00:24:23 -04:00
Jose Diaz-Gonzalez
86795ddacc tests: run mvdan/shfmt on test runs
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 .
```
2019-01-07 01:25:55 -05:00
Jose Diaz-Gonzalez
fabb18c55c feat: allow disabling the nginx-vhosts plugin by default
This allows us to force another plugin as the default vhost implementation, or disable it altogether in favor of some higher-level proxy implementation, such as one that integrates with service discovery.
2018-09-30 17:04:05 -04:00
Jose Diaz-Gonzalez
c352f463f7 fix: use correct path for /etc/default file
/etc/defaults was an invalid path.
2018-04-01 17:48:08 -04:00
Jose Diaz-Gonzalez
5242eeeb86 feat: source /etc/defaults/dokku if available
This allows users to override - at a top-level - the DOKKU_ROOT, DOKKU_LIB_ROOT, and other
configuration variables. If specified, this should begin to enable users to move their
Dokku installations to mounted drives.

Note that items installed from packages may not respect these paths, so further work may be in order.

Closes #2958
2018-02-24 16:52:04 -05:00
Kazuhiro NISHIYAMA
62b27d4007 Remove unnecessary lines
Because never reached when `VHOST` is regular file.
(reachable when `VHOST` is fifo, etc.)

[ci skip]
2017-10-11 20:58:26 +09:00
Jose Diaz-Gonzalez
093414b846 feat: add logging 2017-10-02 11:48:29 -04:00
Jose Diaz-Gonzalez
f664ad1cde fix: remove extra whitespace 2017-10-02 11:40:31 -04:00
Andrea Rabbaglietti
5e9306ad40 Fix #2927
Fix to prevent dokku upgrade on debian systems overwrites ${DOKKU_ROOT}/VHOST
2017-10-02 17:37:17 +02:00
Jose Diaz-Gonzalez
8677aadad7 fix: explicitly chown data and data/storage directories
Doing a recursive chown will otherwise screw up dockerfile-based app storage when the uid does not map to herokuish or similar.
2017-04-02 15:07:18 -04:00
Jose Diaz-Gonzalez
79a7342808 Check that the confmodule is sourceable before sourcing it 2016-06-09 12:48:54 -04:00
Jose Diaz-Gonzalez
b1deb45c81 Rewrite sshcommand calls to take into account potential locations of sshcommand 2016-06-09 12:40:01 -04:00
Jose Diaz-Gonzalez
4230e816df Allow acl-add to fail 2016-04-12 19:37:45 -04:00
Jose Diaz-Gonzalez
22d053c9d0 Create storage directories on install. Closes #2091
[ci skip]
2016-04-08 11:22:43 -04:00
Jose Diaz-Gonzalez
aefd5bb251 Delete bad symlinks without confirmation
[ci skip]
2016-03-26 19:28:09 -04:00
Jose Diaz-Gonzalez
61f9ae6e67 Fix shellcheck violation 2016-01-02 04:31:48 -05:00
Jose Diaz-Gonzalez
bb525a3cf1 Properly handle dokku-installer installation 2016-01-02 03:53:27 -05:00
Jose Diaz-Gonzalez
cac272a247 Fix restarts of systemctl and dokku-installer
We previously assumed that systemd was detectable by the existence of certain directories. Unfortunately, it seems 14.04 already has these directories, so we need to handle this case separately.

One other note is that dokku-installer will fail to "start" if already started on certain systems, thus the previous grep was more accurate in it's running.
2016-01-02 02:29:57 -05:00
Jose Diaz-Gonzalez
f7a1f5c095 Fix lintian warning: file-in-unusual-dir 2016-01-01 22:02:40 -05:00
Jose Diaz-Gonzalez
1314b3942d Correctly handle dokku-installer init file creation on systemd instances
- Use the nginx.conf file's existence as a check for whether we should start the service or not
- Create the init files with the dokku-installer.py file. This adds actual systemd support.
- Also ensure we *always* start the service, regardless of it's status. This fixes an issue with processing systemd output
2016-01-01 21:37:42 -05:00
Jose Diaz-Gonzalez
55b2aba3a8 Fix casing on all debugging messages 2016-01-01 21:35:11 -05:00
Jose Diaz-Gonzalez
94b2a6a014 Invoke db_stop to ensure underlying services close open file descriptors 2015-12-31 08:54:02 -05:00
Jose Diaz-Gonzalez
908f551e0f Enable debugging support to debian postinst hook
It is now possible to turn on debugging during an apt-get run by using `TRACE=1`
2015-12-31 08:22:06 -05:00
Jose Diaz-Gonzalez
f6a4521e19 Allow setting DOKKU_LIB_ROOT env var to modify the lib path on install 2015-12-23 20:02:56 -05:00
Jose Diaz-Gonzalez
6fbe8cabde Respect DOKKU_ROOT in debian/postint
[ci skip]
2015-12-23 03:59:10 -05:00
Jose Diaz-Gonzalez
ab2721bc37 Guard against invalid key file during installation
[ci skip]
2015-12-07 11:52:14 -05:00
Michael Hobbs
6eee13b67f chown plugins paths to dokku:dokku. closes #1554 2015-11-16 13:32:34 -05:00
Dan Callahan
c389b213b5 Resolve SC2162: 'read without -r mangles backslashes'
More information:

https://github.com/koalaman/shellcheck/wiki/SC2162

http://wiki.bash-hackers.org/commands/builtin/read
2015-11-04 20:40:42 -06:00
Jose Diaz-Gonzalez
0f14e9652f Release 0.4.0 2015-09-20 16:49:13 -04:00
Michael Hobbs
18d234a925 move plugin-* to plugin: namespace 2015-09-15 02:17:28 -07:00
Loïc Guitaut
ac75c726ad Plugins management
We had an issue with third party plugins installing things via apt while
already installing dokku itself via apt.

To resolve this, `plugins-install` and `plugins-install-dependencies`
now can take a `--core` flag allowing to execute the install hook only
on core plugins and not on third party plugins.

Another feature with this modification is the ability to disable/enable
plugins. Two new commands now exist:

* `plugins:enable <name>` to enable a previously disabled plugin
* `plugins:disable <name>` to disable an installed plugin. This won’t
  work on core plugins.
2015-09-15 02:15:39 -07:00
Jose Diaz-Gonzalez
55d4fb788e Revert "Remove dokku plugins-install from postinst hook"
This reverts commit 1bf30bdcb1.

Commit was reverted as this breaks installs of core plugins. It is also a hack around broken plugins that don't use the `dependencies` pluginhook.
2015-08-19 21:45:10 -04:00
Jose Diaz-Gonzalez
1bf30bdcb1 Remove dokku plugins-install from postinst hook
All core plugins that require debian packages already have those packages specified in the `depends` stanza of the `control` file, so no need to respecify them here.
2015-08-19 11:12:28 -04:00
3onyc
d9a989d6b0 Use debconf to allow for command-line or unattended installation 2015-05-15 17:43:40 +02:00