Commit Graph
187 Commits
Author SHA1 Message Date
Michael Hobbs d7b1e38cb7 ensure we run plugin commands as root. closes #1768 2015-12-22 11:16:25 -08:00
Michael Hobbs 88be5083e0 filter out Procfile comments. closes #1792. closes #1742 2015-12-21 08:23:35 -08:00
Michael Hobbs 6a51ec0f64 Merge pull request #1709 from progrium/1614_mh-wildcard-domains
fix Must specify DOMAIN error over ssh (supercedes #1691)
2015-11-19 14:10:20 -05:00
Justin Clark 59912d43f1 fix Must specify DOMAIN error over ssh 2015-11-13 18:02:07 -08:00
Jose Diaz-Gonzalez fc125d41e8 Add user-auth plugin trigger
This plugin trigger should allow users to pair down the available commands for a given user. While this does not affect help output - or any output at all - this is a good first step in allowing administrative access to certain commands while still allowing users to deploy/manage given applications.

Note that because of how dokku works, all parsing of commands must be done within the pluginhook, and we cannot give visibility into the actual command or application that will be affected by a given run.
2015-11-08 15:36:04 -05:00
Jose Diaz-Gonzalez 7307b385d8 Ensure we exit with the proper status code 2015-11-08 15:33:15 -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 6674d7823e Automatically detect whether dokku is running on debian vs ubuntu
Refs #976
2015-10-24 23:12:14 -04:00
Michael Hobbs e76bc37988 remove docker restart policy until it stabilizes. closes #1505 2015-10-22 11:29:33 -07:00
Michael Hobbs f9e636ddb1 make sure dokku can read nginx logs and don't remove other perms. closes #1572 2015-10-20 16:07:42 -07:00
Jose Diaz-Gonzalez 1e543afb78 Retrieve default docker args a single time 2015-09-18 16:09:59 -04:00
Jose Diaz-Gonzalez b9ecb32d3f Reduce deploy trace output for multi-container applications
This reduces deploy output by moving `config:get` calls out of the main loop. Since the values are the same for each iteration, it does not make sense to re-retrieve them each time.
2015-09-18 16:08:24 -04:00
Jose Diaz-Gonzalez 1975384292 Fix issue where restart on failure option overrode existing DOCKER_ARGS 2015-09-17 10:32:14 -07:00
Jose Diaz-Gonzalez ab8eb5a727 Handle crashing containers by using restart=on-failure policy
Previously a crashed container would stay down, regardless of exit status. In some cases, it may be useful to restart the container. For example, an application may not be correctly implementing their error handling, or the crash may be caused by a transient error.

By setting the restart policy to `on-failure:N` - where N is a number of max restarts - we can help developers guard against crashing applications. Note that this is not a replacement for proper error handling, nor does this include notifications to a developer when a container is restarted. Those patterns should be implemented application side, or via a feature request to docker.

The value is configurable at the app-level by setting DOKKU_RESTART_LIMIT to a number. By default, containers will be restarted a max of 10 times. If a container crashes during the check-deploy plugin trigger, then the deploy will be marked as a failure.

Closes #216
Closes #398
Closes #1327
2015-09-16 23:47:33 -07:00
Michael Hobbs 72a1b76b63 don't require sudo for tailing logs since we're root anyway 2015-09-15 10:15:22 -07:00
Michael Hobbs 872fbc130e new trigger for failed container retirement 2015-09-15 02:17:28 -07:00
Michael Hobbs 8095df79f6 implement core plugin mgmt using plugn. add tests. 2015-09-15 02:17:28 -07:00
Michael Hobbs d6341e9ab7 set DOKKU_API_VERSION initially to 1 2015-09-15 02:17:28 -07:00
Michael Hobbs 18d234a925 move plugin-* to plugin: namespace 2015-09-15 02:17:28 -07:00
Jose Diaz-Gonzalez b3ddcbed53 Remove deprecated calls 2015-09-15 02:17:27 -07:00
Michael Hobbs 7a545759f2 initial pass at switching to plugn 2015-09-15 02:16:40 -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 0ef3f71d8d Set DYNO env var to heroku-compatible value
Closes #1459
2015-09-14 20:30:57 -07:00
Michael Hobbs 51e8b540cc Merge pull request #1458 from progrium/mh-trace
set TRACE=true when DOKKU_TRACE is set
2015-09-10 14:36:33 -07:00
Michael Hobbs 01525e3164 set TRACE=true when DOKKU_TRACE is set 2015-09-10 14:07:07 -07:00
Luke Childs 2123917e9b Consistent spacing before do/then 2015-09-10 20:46:29 +01:00
Luke Childs a7c0020ceb while and do on same line in dokku deploy 2015-09-10 20:43:48 +01:00
Luke Childs 299d530959 Use [[ instead of [ in dokku deploy 2015-09-10 20:33:10 +01:00
Michael Hobbs b2949d2199 log when killing old app container(s) fails 2015-09-10 08:47:48 -07:00
Michael Hobbs ff6de12196 Merge remote-tracking branch 'akatrevorjay/pull-req-0' into 1356_mh-safe-stop-kill-event 2015-09-10 08:30:50 -07:00
Jose Diaz-Gonzalez 342e9aa95b Move dokku cleanup into docker_cleanup function
This should slightly reduce DOKKU_TRACE output.
2015-09-06 19:21:12 -04:00
Michael Hobbs ccb9e4a571 remove duplicate output 2015-09-03 17:25:28 -07:00
Michael Hobbs 495b1d2ba0 refactor to explicitly set IMAGE via get_app_image_name() 2015-09-03 16:12:36 -07:00
Michael Hobbs 04a4da7fc5 allow tagging and deployment of tagged app images 2015-09-02 11:18:01 -07:00
Jose Diaz-Gonzalez cd23310042 Surround in single quotes 2015-08-26 02:30:57 -04:00
Jose Diaz-Gonzalez b6ef5af3d1 Set DYNO_TYPE_NUMBER environment variable for each container
This will allow users to inspect the underlying environment and conditionally run different commands based upon the `DYNO_TYPE_NUMBER`. The values will be set in the following format:

    web.1
    web.2
    worker.1
    worker.2
    clock.1

Users of process managing plugins and dockerfiles can check the `DYNO_TYPE_NUMBER` and set a specific command to run.

Closes #1350
2015-08-26 00:35:22 -04:00
Michael Hobbs 6d71c164f0 Merge pull request #1128 from progrium/1091_mh-switch-to-herokuish
switching to herokuish. closes #1091
2015-08-24 12:11:05 -07:00
Michael Hobbs 42905c345b support comments in DOKKU_SCALE and print contents on deploy 2015-08-24 09:22:07 -07:00
Michael Hobbs 26d761d85b make sure we sort container id files, et al correctly even if the app name contains a period. fixes #1382 2015-08-12 21:36:25 -07:00
Michael Hobbs c02ba86c81 allow DOKKU_WAIT_TO_RETIRE to be defined per app. closes #1258 2015-07-30 15:03:19 -07:00
Trevor Joynson (trevorj) c750f5a768 Allow stop/kill to continue in the event that it cannot stop or kill one of the old containers.
Also actually attempt to kill if stop has a bad exit code.
2015-07-30 16:42:13 -04:00
Michael Hobbs d21caa4811 Merge branch 'master' into 1091_mh-switch-to-herokuish 2015-07-28 10:55:44 -07:00
Michael Hobbs b30db17def use column to format help output 2015-07-28 09:31:56 -07:00
Michael Hobbs 9593bd6d48 simplify docker run logic in deploy 2015-07-24 12:15:10 -07:00
Michael Hobbs da5f42a13e set and use $port whenever $PROC_TYPE == 'web'. closes #1336 2015-07-24 10:40:00 -07:00
Michael Hobbs c7cb014580 convenience functions for app container state 2015-07-13 09:27:42 -07:00
Jose Diaz-Gonzalez f27cbe1325 Merge pull request #1313 from progrium/1309_mh-verify-app-in-deploy
verify we have an app when deploy is called
2015-07-13 10:35:22 -04:00
Michael Hobbs b0ca3aadb0 verify we have an app when deploy is called. fixes #1309 2015-07-12 16:59:16 -07:00
Michael Hobbs 57b405ce76 use config:get for checks skipping variables 2015-07-12 15:23:51 -07:00
Jose Diaz-Gonzalez 43b179735b Merge pull request #1261 from Flink/bypass-checks-on-demand
Allows to skip checks (all or default)
2015-07-11 16:31:21 -04:00