opened
scjody
username_0
We also discussed replacing the `DOKKU_SCALE` file in the app's home directory. This file is  a bit weird in that it means "this is what I want the scaling to be" in the app's repo, but "this is what the scaling _is_" in the app's home directory. We don't currently have a good short term proposal on what to replace `DOKKU_SCALE` with, but querying Docker for the current scale status would work if it can be done efficiently.

@username_2 FYI, since you're working in this area.
ps: scale cleanups
issue
created
josegonzalez
username_1
Querying docker's current state won't work if the containers die or are pruned, unfortunately :(
comment
created
gyfis
username_2
Thanks for the tag!

Based on my (very limited) experience running a production app on dokku, I would prefer to not query Docker for the current scaling state - it doesn't seem very stable.

As for the `DOKKU_SCALE` in the file app's home directory (again with very limited knowledge about the topic) - I like the fact a _current_  scaling is written somewhere explicitly, to keep track. Is it only a naming issue (plus some refactor), e.g. what about `DOKKU_CURRENT_SCALE`? 

We don't personally use the `DOKKU_SCALE` in the app's repo so I'm biased, but I can also see you deprecating the app's repo `DOKKU_SCALE` in favor of a no-deploy dokku ps:scale command before deploy or for scaling (which would be the only(?) way to scale, instead of pushing a new version with a new `DOKKU_SCALE` file).
comment
created
scjody
username_0
Yes, a `DOKKU_CURRENT_SCALE` file would work. We were trying to come up with an alternative that didn't involve a file in the app directory, but there doesn't seem to be a simple one that would work with Dokku as it is now.

We intend to continue to support both use cases: scaling via a file in the repo (whether that's `DOKKU_SCALE` or an entry in `app.json`) _or_ scaling via `ps:scale` if there is no file. We've found that some users prefer one or the other depending on their particular workflows.
comment
created
josegonzalez
username_1
Going to merge this into #4500. The ps plugin was otherwise refactored to make the code here a bit faster and easier to understand, but the upcoming changes should completely clarify what is happening.
comment
closed
josegonzalez
username_1
issue