Jose Diaz-Gonzalez
fec872711a
fix: treat empty ps restart-policy as an unset
...
`dokku ps:set <app> restart-policy` with no value erroneously returned `Invalid restart-policy specified` instead of unsetting the property like every other ps property. The restart policy is now managed as a normal app and global property surfaced through the `--ps-restart-policy`, `--ps-global-restart-policy`, and `--ps-computed-restart-policy` report flags, with the effective value applied at deploy time and existing values migrated on install. Because it is no longer stored as a Docker option it no longer appears in `docker-options:report`, and `--ps-restart-policy` now reports the raw value with the `on-failure:10` default available via `--ps-computed-restart-policy`.
2026-05-28 03:10:03 -04:00
Jose Diaz-Gonzalez
1308e21947
feat: migrate environment variables to plugin properties
...
Standardize how environment variables are migrated to properties during
install triggers and migrate all remaining DOKKU_* config vars to their
appropriate plugin properties.
Adds a reusable MigrateConfigToProperties() function in the common
package with Transform callback and ListProperty support, plus a
migrate-config-to-property subcommand for the prop binary so shell
plugins can use the same code path.
Migrated variables and their new property owners:
- DOKKU_APP_PROXY_TYPE/DOKKU_PROXY_TYPE → proxy type
- DOKKU_DISABLE_PROXY → proxy disabled
- DOKKU_PROXY_PORT → ports proxy-port
- DOKKU_PROXY_SSL_PORT → ports proxy-ssl-port
- DOKKU_APP_RESTORE → ps restore
- DOKKU_SKIP_DEPLOY → ps skip-deploy
- DOKKU_START_CMD → ps start-cmd
- DOKKU_DOCKERFILE_START_CMD → ps dockerfile-start-cmd
- DOKKU_DISABLE_APP_AUTOCREATION → apps disable-autocreation
- DOKKU_APP_SHELL → scheduler shell
- DOKKU_SKIP_CLEANUP → builder skip-cleanup
- DOKKU_CHECKS_DISABLED → checks disabled
- DOKKU_CHECKS_SKIPPED → checks skipped
- DOKKU_CHECKS_WAIT → checks wait
- DOKKU_CHECKS_TIMEOUT → checks timeout
- DOKKU_CHECKS_ATTEMPTS → checks attempts
- DOKKU_DEFAULT_CHECKS_WAIT → checks default-wait
- DOKKU_SKIP_ALL_CHECKS → checks disabled (legacy)
- DOKKU_SKIP_DEFAULT_CHECKS → checks skipped (legacy)
Also refactors existing bespoke migration loops in scheduler, ports, ps,
builder, and nginx-vhosts plugins to use the standardized utility.
Removes DOKKU_PARALLEL_ARGUMENTS from documentation (unused in core).
Deprecates fn-migrate-config-to-property bash function.
closes #1558
2026-04-25 05:11:07 -04:00
Jose Diaz-Gonzalez
9beab4d50d
refactor: migrate DOKKU_DOCKER_STOP_TIMEOUT to ps setting
2025-06-09 11:39:00 -04:00
Jose Diaz-Gonzalez
bb5ab0a777
refactor: use CallPlugnTrigger instead of PlugnTrigger
...
Refs #6422
2024-03-14 03:11:37 -04:00
Jose Diaz-Gonzalez
cdff4ae867
refactor: use CallPlugnTrigger instead of PlugnTriggerOutput
...
Refs #6422
2024-03-14 01:18:28 -04:00
Jose Diaz-Gonzalez
2acc492906
chore: ensure ps:stop has a proper cli header
2024-01-18 22:31:41 -05:00
Jose Diaz-Gonzalez
6fed37b408
refactor: rename pre-restore trigger to scheduler-pre-restore
...
This better reflects what the trigger does, and allows us to use the pre-restore trigger at the beginning of the ps:restore command.
2022-11-29 01:38:36 -05:00
Jose Diaz-Gonzalez
bc26766b84
refactor: use exit code 137 to signify a lock was unable to be retrieved when calling ps:retire
...
Closes #5432
2022-11-27 20:23:13 -05:00
Jose Diaz-Gonzalez
ecea1488e1
fix: ignore errors clearing proxy configs
...
If one fails to rebuild for whatever reason, just continue onward.
2022-01-28 20:58:31 -05:00
Jose Diaz-Gonzalez
e24a3603ac
feat: add log message when running state is false
...
Without this, its not clear why we are releasing an app when calling `ps:start` or `ps:restore`.
2021-12-02 11:53:13 -05:00
Jose Diaz-Gonzalez
b48b79f5ca
feat: allow specifying a single process type to restart
...
This changes restarts to drop the 'release' part that currently gets triggered, which also helps reduce the possibility that a new image layer will be added due to predeploy deploy triggers.
Note that the old method essentially halfway-rebuilt the app (which was what added the extra layer). This refactor removes that, which is a bc-break.
Additionally, scaling processes will result in deploying _only_ restarting the processes being scaled.
Closes #2184
2021-10-09 18:46:17 -04:00
Jose Diaz-Gonzalez
a62f04fa7e
docs: add godoc
2021-08-01 15:47:55 -04:00
Jose Diaz-Gonzalez
c62bff3002
refactor: hide dokku scale file parsing inside ps plugin
2021-08-01 01:21:46 -04:00
Jose Diaz-Gonzalez
c3ece32145
feat: add ability to specify a custom Procfile path
2021-07-10 14:57:56 -04:00
Jose Diaz-Gonzalez
e1425a85e4
feat: add ability to set global properties
...
Not all properties can be set globally, and the "appName" in the global case is currently defaulted to `--global`. This is okay because domain label names cannot start with hyphens, and all app names must be valid domain label names.
2021-01-04 00:50:14 -05:00
Jose Diaz-Gonzalez
28c9f42a25
refactor: parallelize report commands
...
This will make reports a bit faster to run, and is safe to do as reports should not change app state.
2020-12-29 23:56:10 -05:00
Jose Diaz-Gonzalez
3ba775d4b3
feat: add better logging to ps:restore output
...
Without the logging additions, it's a bit more difficult to figure out why a ps:restore is skipping the restore of an app.
2020-12-20 04:15:42 -05:00
Jose Diaz-Gonzalez
ae1b1c7274
chore: move function to internal
2020-11-21 21:07:20 -05:00
Jose Diaz-Gonzalez
ab0cc6c444
fix: implement ps:restore
...
Also add all the niceties around parallelism that were introduced for the other commands.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
e6e5ede436
refactor: make parallel commands available to all of Dokku
...
There are other places in the codebase that currently act on all apps or could benefit from being able to do so. Being able to run `common.RunCommandAgainstAllApps()` and get that for free will be a boon to implementing this functionality elsewhere.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
28a36c4908
feat: add proper parallel support
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
f558008574
fix: correct a few stickler errors
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
037b99865d
fix: use CamelCase for constants
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
f13ee16ab8
feat: add support for process state in ps:report output
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
e8d0965a33
feat: implement all of ps:report
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
e8cfbfad36
fix: drop todos
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
e7ee7a1781
refactor: implement most of ps plugin in golang
2020-11-21 20:57:33 -05:00