Commit Graph

536 Commits

Author SHA1 Message Date
Michael Hobbs
6b01da6dda fix CURL_TIMEOUT settings 2015-09-28 18:06:10 -07:00
Michael Hobbs
b49cceefd7 don't use exit 0 in config functions 2015-09-28 17:44:10 -07:00
Loïc Guitaut
03dee47d69 Colorize logs
Move logs into a dedicated plugin.
2015-09-28 12:34:58 +02:00
Jazz
895b4d2c6a Log user name and fingerprint in events 2015-09-24 17:22:03 +02:00
Loïc Guitaut
9b9e983d2c Strip the dokku- part from plugins on install 2015-09-22 15:45:49 +02:00
Michael Hobbs
fd44635e74 Merge remote-tracking branch 'origin/reduce-trace-output' into 1123_mh-nginx-novhost 2015-09-18 17:34:32 -07:00
Michael Hobbs
3e18d9aff9 create functions for app/global vhost detection. make VHOST setting more explicit 2015-09-18 16:48:18 -07:00
Jose Diaz-Gonzalez
f914e6207b Consolidate ipv4/ipv6 regex declarations behing nginx-vhosts plugin 2015-09-18 16:15:26 -04:00
Jose Diaz-Gonzalez
d3c218f95e Add help commands to docker-options and tar plugins 2015-09-18 16:09:59 -04:00
Jose Diaz-Gonzalez
70511c340d Check if command is implemented in a plugin before executing plugin code
Because of how plugin commands are implemented, their output can be incredibly verbose. Rather than executing even the `set -eo pipefail` parts of a plugin, we immediately check if the command is implemented by a plugin. If it is not, then we continue on as normal.

One side-effect of this change is that plugin commands need to be duplicated again:

- once in the command array
- once for the actual body of the command
- once in the help output

This is also quite hackish, and probably not the best way to decrease trace output. Note that we drop approximately 2k lines worth of logs with this change.
2015-09-18 16:09:59 -04:00
Jose Diaz-Gonzalez
467264d31f Drop another ~1k lines from DOKKU_TRACE output 2015-09-18 16:09:59 -04:00
Arthur Schreiber
b6c4a750de Support removing config variables that contain \n. 2015-09-18 15:32:33 +02:00
Michael Hobbs
6e7ca94d84 set SSL_VHOSTS to HOSTNAME if NO_VHOST is set and filter out server_name stanza if we have no hosts" 2015-09-17 22:47:03 -07:00
Michael Hobbs
f84c2bf6d8 be explicit about our template path since others are calling us as a function 2015-09-17 21:56:19 -07:00
Michael Hobbs
943e9b387c fixing tests 2015-09-17 21:40:34 -07:00
Michael Hobbs
de6ccf4ce2 cleanup unnecessary failure message 2015-09-17 21:15:18 -07:00
Michael Hobbs
4dd4d7c567 initial pass at nginx proxy without VHOST. closes #1123 2015-09-17 19:09:38 -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
c8b8b9bb93 generate DOKKU_SCALE based on Procfile if DOKKU_SCALE is not found. closes #1442 2015-09-16 17:17:26 -07:00
Jose Diaz-Gonzalez
27a2478a33 Follow bashstyle where possible 2015-09-16 16:06:31 -07:00
Jose Diaz-Gonzalez
1e479c63bd Upgrade dokku installation to use docker-engine
Also simplify deb-based installation everywhere.

Closes #1295
Closes #1461
2015-09-15 13:35:45 -07:00
Jose Diaz-Gonzalez
1be4b94226 Merge pull request #1469 from progrium/1352_mh-nginx-logs-commands
Add nginx:access-logs and nginx:error-logs without sudo requirement
2015-09-15 12:03:32 -07:00
Jose Diaz-Gonzalez
64b57359b5 Merge pull request #1470 from progrium/1055_mh-nginx-ssl-terminated
Add nginx configuration for running behind load balancer
2015-09-15 11:20:35 -07:00
Michael Hobbs
c62ac4bcc3 Merge pull request #1372 from SonicHedgehog/default-nginx-conf
Do no longer force-install a default nginx.conf
2015-09-15 10:47:57 -07:00
Michael Hobbs
964a84dc31 rename ssl terminated template to conform to naming scheme 2015-09-15 10:36:14 -07:00
Assaf Arkin
1b84527f8c ADDED Nginx configuration for running behind load balancer 2015-09-15 10:31:27 -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
Jiahao Li
cca49230d9 Add nginx:access-logs and nginx:error-logs.
Add two nginx subcommands to display nginx error/access logs for a particular app.
2015-09-15 10:08:52 -07:00
Jose Diaz-Gonzalez
c929edfbe5 Source plugins from $PLUGIN_AVAILABLE_PATH when not using common plugin
This will allow us to override any core plugin
2015-09-15 02:22:08 -07:00
Michael Hobbs
5fdd69a657 remove remnants of bad rebase 2015-09-15 02:17:28 -07:00
Michael Hobbs
e8fb585fa8 rename buildstep hooks to buildpack 2015-09-15 02:17:28 -07:00
Jose Diaz-Gonzalez
4bcc9ac05d Remove deprecated calls 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
30631692a5 cat is no longer needed by plugn 2015-09-15 02:17:28 -07:00
Michael Hobbs
18d234a925 move plugin-* to plugin: namespace 2015-09-15 02:17:28 -07:00
Michael Hobbs
e873f27eac remove remnants of bad rebase 2015-09-15 02:17:28 -07:00
Jose Diaz-Gonzalez
aaa7a4ecb0 Revert change that whitelisted dokku-labeled containers
Rather than having a one-off hack for "blessed" containers, we should solve the issue properly. As that would take a bit more work, reverting to the previous state is preferred.

Better that we solve a problem problem than with a hack that we'll need to roll back in the future.

Refs #1220

[ci skip]
2015-09-15 02:17:27 -07:00
Michael Hobbs
cd3af6b961 rename buildstep hooks to buildpack 2015-09-15 02:17:27 -07:00
Jose Diaz-Gonzalez
525e6f503d Remove deprecated calls 2015-09-15 02:17:27 -07:00
Jose Diaz-Gonzalez
92497cf095 Do not delete containers with the label dokku.service
[ci skip]
2015-09-15 02:17:27 -07:00
Jose Diaz-Gonzalez
c9bca838f0 Add missing $ 2015-09-15 02:17:27 -07:00
Jose Diaz-Gonzalez
b3ddcbed53 Remove deprecated calls 2015-09-15 02:17:27 -07:00
Jose Diaz-Gonzalez
ce23cf6ce6 rename dokku_log_pluginhook_call 2015-09-15 02:16:40 -07:00
Jose Diaz-Gonzalez
ad72a137e1 Fix sourcing of functions 2015-09-15 02:16:40 -07:00
Michael Hobbs
6d70751cfc force removal of app directory on post-delete 2015-09-15 02:16:40 -07:00
Michael Hobbs
5d8359c12e fix nginx template paths 2015-09-15 02:16:40 -07:00
Michael Hobbs
7a545759f2 initial pass at switching to plugn 2015-09-15 02:16:40 -07:00
KernelMadness
7eb8da5302 limit amount of lines in "dokku logs -t" 2015-09-14 23:59:19 +03:00
Michael Hobbs
01525e3164 set TRACE=true when DOKKU_TRACE is set 2015-09-10 14:07:07 -07:00
Michael Hobbs
b2949d2199 log when killing old app container(s) fails 2015-09-10 08:47:48 -07:00