F1bonacc1 / process-compose

Process Compose is a simple and flexible scheduler and orchestrator to manage non-containerized applications.
https://f1bonacc1.github.io/process-compose/
Apache License 2.0
1.09k stars 29 forks source link

read flags from config file? #194

Open smeijer opened 2 weeks ago

smeijer commented 2 weeks ago

Is it possible to add cli options to the process-compose.yaml ? Such as starting in full-screen mode (ctrl + ]) or changing the manager port not via env but controlling it via the config file, or the -t=false, etc?

Qqwy commented 2 weeks ago

In the same vein: one of our services runs on port 8080. While we can make sure to always start process-compose with -p 8081, it would be much nicer if that could be encapsulated in the configuration.

We've tried setting PC_PORT_NUM=8081 in the environment section of the process-compose.yaml as well, but it seems that this environment setting is not used for the configuration of process-compose itself.

F1bonacc1 commented 1 week ago

That's a good proposal. I think it was already discussed in the past, but I can't find the issue right now :)

Background

So far the PC philosophy was to separate the business logic configuration (processes and orchestration) from preferences and environment considerations (themes, tui, ports).

The idea behind it is portability and the ability to manage process-compose.yaml files in source control. If you change it and commit it, it should be applicable for all the environments, all the local changes are kept local (not in source control).

Having said that, I see how @Qqwy's use case breaks at least some of those assumptions. Of course, there is also a possibility that a process-compose.yaml configured port in environment A will not be free in environment B. Thus creating more unwanted commits.

Proposal

smeijer commented 5 days ago

That works for me and makes a lot of sense. Thanks!