Open kota65535 opened 1 week ago
I agree with this. Personally, I wouldn't go for making it configurable, but IMO, relative paths should be relative to the file they're defined in. The resolution of a path shouldn't change based on from where it's extended.
If one needs to adjust the path, they can override it in the extending file.
Hi @kota65535,
I think it's a good proposal. I think it will make more sense to keep it simple and to set the working_dir
(for each process):
process-compose.yaml
process-compose.yaml
location with the defined working_dir
.What do you think?
Feature Request
Use Case:
First of all, thank you for creating such a great tool!
Recently, process-compose introduced the
extends
keyword which makes it easier to merge multiple configuration files. I'm trying to apply this feature to monorepo, which has multiple packages and dependencies.Assume we have the following monorepo:
process-compose.yaml in
db
package:process-compose.yaml in
server
package:Currently, the relative paths in the extended file (process-compose.yaml in
db
package) are resolved relative to the extending file (process-compose.yaml inserver
package). So runningprocess-compose up
inserver
directory results in the following error, because we don't havedb-start.sh
inserver
directory.It would be helpful if we have a way to specify how relative paths of the extended file are resolved (the file they originated in or the extending file).
Proposed Change:
Maybe something like this?
Available values are:
extended
: The relative paths in extended configuration file are resolved relative to the file they originatedextending
: The relative paths in extended configuration file are resolved relative to the file havingextends
keywordI think we can come up with more obvious word.
Who Benefits From The Change(s)?
Users using extends keywords, especially working with monorepos.
Alternative Approaches