89 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
815cd530c8 chore: remove functions 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
3714a231a9 chore: drop unused code 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
696df45306 refactor: extract release_and_deploy calls to a plugin trigger
Better would be to separate the release and deploy aspects into distinct triggers - as well as have it release a specific image - but this is a good first pass.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
4d735b4d88 fix: do not output error on checking for process type existence 2020-08-31 18:55:39 -04:00
Jose Diaz-Gonzalez
1ea60a16e5 refactor: move external procfile manipulation into triggers
This also cleans up the internal APIs a bit.
2020-08-30 13:41:14 -04:00
Roland van Laar
5f312d7347 Make make test pass on linting 2020-07-04 00:08:44 +02:00
Jose Diaz-Gonzalez
ee7d7f164f fix: set default port for all run commands
Closes #3976
2020-05-07 12:01:54 -04:00
Jose Diaz-Gonzalez
d35576302d chore: drop dokku references in logging output
This isn't super useful outside of branding. Users that rely on this information may wish to turn on event logging to trace output that way.
2020-05-05 23:39:38 -04:00
Jose Diaz-Gonzalez
e19b52442b fix: remove deprecated egrep calls from codebase 2020-02-17 05:59:52 -05:00
Jody McIntyre
f1dd722971 Update DOKKU_SCALE from Procfile during ps:scale
This is needed so that we report on processes added to an app's
Procfile.
2019-10-04 08:35:58 -04:00
Jose Diaz-Gonzalez
3ca6245b00 fix: use 6 X to support running under busybox
mktemp from busybox requires that all templates end with XXXXXX.
2019-08-12 18:16:16 -04:00
Jose Diaz-Gonzalez
925c6c4c28 feat: inject the dokku PID into temporary files/directories
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.
2019-08-12 17:56:17 -04:00
Jose Diaz-Gonzalez
7dbeffd041 chore: drop unnecessary stdout redirect to /dev/null 2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
d326c17dfb chore: standardize on writing to file versus a destination 2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
fc5544ac70 refactor: use a single method for running the ps:*all commands
This reduces the duplication at the cost of slightly more complexity.
2019-06-10 13:05:57 -04:00
Jose Diaz-Gonzalez
e276ebbc27 feat: add support for pulling app status from scheduler plugins
Previously, this was impossible to do if using an alternative scheduler.
2019-05-28 14:53:42 -04:00
Jose Diaz-Gonzalez
1b92f4a97e chore: standardize how temporary files are named 2019-05-20 18:01:17 -07:00
Jose Diaz-Gonzalez
da4361583b fix: reverse quotes for variable expansion
Without reversing quotes, the variables are sometimes improperly expanded, resulting in files not being removed.
2019-05-20 17:56:50 -07:00
Jose Diaz-Gonzalez
4264380e15 feat: disable scaling if app contains DOKKU_SCALE file
A DOKKU_SCALE file will always be used for managing the scale count for an app if it exists in a repository. As such, ps:scale usage should be disabled in those cases. This commit makes that more apparent.

Also document how to build a specific core plugin for testing purposes.

Closes #3544
2019-05-18 15:24:59 -07:00
Jose Diaz-Gonzalez
0275c65b8a feat: add support for quiet ps:scale output
The previous output required too much parsing to be used in an automated fashion. This change makes that a bit easier, without sacrificing usability.

Note that the output is quite a bit different from heroku. This is purposeful as we do not have the concept of dynos.

Closes #3520
2019-05-06 11:19:08 -04:00
Jose Diaz-Gonzalez
97fe3f56b7 fix: Always allow ps:scale proc=0
With the introduciton of procfile-util, scaling a non-existent process to 0 was disabled. This brings back that functionality, allowing users to scale all processes to 0. This is especially useful when a user has accidentally scaled a non-existent process up, causing deploys to fail without any way to revert outside of manually editing files.

Closes #3428
2019-04-16 23:04:45 -04:00
Jose Diaz-Gonzalez
520a72078e fix: remove useless cat 2019-03-13 14:12:35 -04:00
Jose Diaz-Gonzalez
c701429a05 chore: quiet down logging around scale declarations 2019-03-13 02:05:18 -04:00
Jose Diaz-Gonzalez
67ae374e60 lint: remove whitespaces before redirect 2019-02-02 13:49:24 -05: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
05240c56b6 fix: reference correct variable for procfile 2018-10-13 20:17:51 -04:00
Jose Diaz-Gonzalez
64c6437e4e hack: pull procfile if possible when setting ps:scale 2018-10-11 20:19:57 -04:00
Jose Diaz-Gonzalez
81935a8f31 feat: drop debugging info 2018-10-11 20:19:57 -04:00
Jose Diaz-Gonzalez
7f6688c01a hack: log the procfile and more 2018-10-11 20:19:56 -04:00
Jose Diaz-Gonzalez
95292bfcba fix: correct issue where we accidentally bailed when there was no error 2018-10-11 20:19:56 -04:00
Jose Diaz-Gonzalez
0292c4ee3b refactor: move get_cmd_from_procfile to ps/functions
Procfile handling should only be performed in the ps plugin
2018-10-11 20:19:56 -04:00
Jose Diaz-Gonzalez
afd101034d feat: verify that a process exists before scaling it
Refs #2582
Refs #3196
2018-10-11 20:19:56 -04:00
Jose Diaz-Gonzalez
b6fe31f9cb fix: call procfile-util correctly 2018-10-11 20:19:56 -04:00
Jose Diaz-Gonzalez
2db8f93507 feat: error out on Procfile extraction if the procfile is invalid
Refs #2991
Refs #3196
2018-10-11 20:19:56 -04:00
Jose Diaz-Gonzalez
ed190527ce feat: allow overriding the scheduler globally
Being able to override globally is useful for cases where a user will _always_ want their applications to be globally distributed
2018-09-30 21:36:53 -04:00
Jose Diaz-Gonzalez
9b41f7a74e fix: use updated fn-ps-is-app-running function to determine an application's status
In some cases, a single allocation for a service may not be running, but the others will, and `is_app_running` will return the wrong thing.

Closes #2772
2018-04-28 01:21:26 -04:00
Jose Diaz-Gonzalez
8d07ffe775 refactor: deprecate is_app_running in favor of ps#fn-ps-is-app-running
This will allow us to _actually_ introspect on the running state of an application. In certain cases, the detected state can be "mixed", meaning that we may need to take action, depending on what we want to do in mixed mode.
2018-04-28 01:19:23 -04:00
Jose Diaz-Gonzalez
e47f6e5803 fix: use dokku_log_warn helper for warning messages in the ps plugin 2018-04-28 01:13:48 -04:00
Jose Diaz-Gonzalez
8474c72a10 refactor: move container stopping into new scheduler-stop plugin trigger 2018-04-06 22:53:02 -04:00
Jose Diaz-Gonzalez
71b578bf10 fix: Properly handle invalid process type entries during DOKKU_SCALE generation
Closes #2991
2018-03-07 21:48:20 -05:00
Jose Diaz-Gonzalez
76dd0252ee feat: add pre-start trigger for notifying on application start
Closes #2713
2017-12-19 00:55:10 -05:00
Jose Diaz-Gonzalez
647efab2dd fix: ensure we always call proxy-build-config when calling ps_start 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
ed7d5623ad fix: attempt to pass shellcheck on os x 2017-03-26 04:38:35 -06:00
Jose Diaz-Gonzalez
1cbdde748e Merge pull request #2290 from dokku/1734-restart-policies
Implement restart-policy handling
2016-07-30 15:10:37 -04:00
Jose Diaz-Gonzalez
cb9c5b6988 Merge pull request #2317 from dokku/jg-cert-remap-http-to-https
Properly remap http port 80 mappings to https 443 when adding an ssl certificate
2016-07-30 15:09:53 -04:00
Jose Diaz-Gonzalez
2474c87bbd Pull the deploying app image name where necessary
All of these commands should execute against the image that is in use versus the "latest" that dokku provides the system with.
2016-07-29 12:49:29 -04:00
Jose Diaz-Gonzalez
de550094da Standardize parenthesis usage for is_deployed 2016-07-23 16:04:13 -04:00
Michael Hobbs
a269f8e003 support --quiet and split up data access from presentation 2016-07-17 15:56:11 -07:00
Jose Diaz-Gonzalez
59c9207797 Implement restart-policy handling. Closes #1734
Applications without a restart-policy will have their policies set to `on-failure:10`. Users can completely unset the restart-policy using the `docker-options` plugin, though this will be equivalent to setting it explicitly to `no`.

Restart policies must be explicitly set, and the following are all valid:

- no
- unless-stopped
- always
- on-failure
- on-failure:NUMBER
2016-07-02 17:22:54 -04:00
Michael Hobbs
cb8a9648c9 support WORKDIR location for DOKKU_SCALE. refs #2226 2016-06-06 17:45:33 -07:00