-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
The project name should be configurable #45
Comments
I don't want to give up top-level services without a fight. Perhaps everything other than service configuration could go in a top-level key with a special name:
|
maybe |
or maybe
or
depending on whether you need extra config. But that's a bit gross. I think I quite like the idea of adding a top-level "services" key. |
+1 on a special key like @aanand mentioned. I would like to do global environment variables here too :) |
+1 for top-level I also like the idea of global environment variables. So you could e.g. give credentials to a database container (for setting up the database & user) as well as all consuming services. Those would be defined in a top-level |
Being able to specify the project-name manually (and not rely on the name of the directory) is quite important;
besides being able to specify the project-name inside fig.yml, fig should also take a parameter to override this, e.g. |
An alternative solution to having a special global key is to support two streams in fig.yaml. Something like this: project-name: something
---
db:
...
app:
...
It might not be a good idea to attach semantics to location in the stream, I just wanted to throw it in the suggestion bowl. |
@thomasf I'm not sure how many yaml parses support multiple streams. I tried it out with |
Its supported according to the docs by using load_all |
What about several (related) projects in one fig.yml? |
Signed-off-by: Daniel Nephin <[email protected]>
Signed-off-by: Daniel Nephin <[email protected]>
Signed-off-by: Daniel Nephin <[email protected]>
@aanand do you see the I'd like to add support for that format to fig so that users can migrate to the new format ahead of any docker release with this support (to make the transition smoother). That change should also resolve this issue. If you think it's still likely to change, I can hold off until it's more stable. |
@dnephin It should be considered unstable, so no adding support just yet. Input appreciated on the format itself - I'm actually somewhat unconvinced about putting the group name in the file, because it makes the whole thing less portable. Perhaps it should go in a separate, unversioned file. |
Signed-off-by: Daniel Nephin <[email protected]>
Could works... until you manage dozen of projects |
jderusse, I would write a line to make it take the project name from something like ./docker-compose-project-name. Just a quick and dirty fix until the option we all ask for is added eventually. |
What about this?
|
+1 |
Any update on this? I would like a way to name the final image either via command line or via yml file. |
The project name is already configurable from command line or environment variable ( |
Yes but it makes sense to allow the project name to be configured in the config file to avoid having to set it on the command line or environment? |
+1 |
+1 for being able to set this in the docker-compose.yml file |
+1 |
Let's continue this in #745. The project name is configurable, now we just need a persistent configuration. |
+2 |
👍 |
1 similar comment
+1 |
+1 maybe make it version: "3" or something |
+1 |
+1 I would definitely love to see this. |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
Right now we can use .env file with custom project name and set |
+1 |
2 similar comments
+1 |
+1 |
I'm locking the conversation on this issue; the |
Ideally in
fig.yml
(how do we have general config in there? maybe we need a top levelservices
key?), but maybe in a separate.fig-project
file or something.The text was updated successfully, but these errors were encountered: