Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read flags from config file? #194

Closed
smeijer opened this issue Jun 18, 2024 · 4 comments
Closed

read flags from config file? #194

smeijer opened this issue Jun 18, 2024 · 4 comments
Labels
done Done, awaiting release enhancement New feature or request

Comments

@smeijer
Copy link

smeijer commented Jun 18, 2024

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
Copy link

Qqwy commented Jun 19, 2024

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 F1bonacc1 added the enhancement New feature or request label Jun 28, 2024
@F1bonacc1
Copy link
Owner

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

  • What do think about a .pc_env file that won't interfere PC .env and with other .env using processes, that will contain all the local PC settings?
  • Another alternative is to add (at least some of) those preferences to the TUI settings file. It won't cover all the use cases mentioned, but might be more user-friendly in some scenarios.

@smeijer
Copy link
Author

smeijer commented Jul 3, 2024

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

@F1bonacc1 F1bonacc1 added the done Done, awaiting release label Jul 26, 2024
F1bonacc1 added a commit that referenced this issue Aug 10, 2024
@F1bonacc1
Copy link
Owner

Added in v1.18.0

Cheers ✌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Done, awaiting release enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants