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

Allow for docker-file inheritance #58

Open
mchastain-turner opened this issue Jul 27, 2020 · 4 comments
Open

Allow for docker-file inheritance #58

mchastain-turner opened this issue Jul 27, 2020 · 4 comments

Comments

@mchastain-turner
Copy link

As a user of the fargate command I would like to be able to deploy my different environments using an inheritance/override model that is allowed with the docker-compose command.

eg: fargate service deploy --service foo --cluster bar -f docker-compose.yml -f docker-compose.dev.yml

#57

@jritsema
Copy link

Just curious, what problem does the "inheritance/override model" solve for you? Is it sharing environment variables?

@mchastain-turner
Copy link
Author

could be environment variables or env files. The default yaml could have default env var or env-files and each environment could inherit and override that without copy and paste. It is also useful for shared x-fargate-secrets just to stop the need for copy/paste.

@jritsema
Copy link

Ok, yeah was going to say that you could use env_file for that.

dev.yml

web:
  env_file:
    - shared.env
    - dev.env

prod.yml

web:
  env_file:
    - shared.env
    - prod.env

@mchastain-turner
Copy link
Author

That's how we currently do it, (copy/paste style). The other piece that is nice is that this is just how docker-compose works, so it doesn't throw the surprise when it doesn't work ( like it did to me ). So you can just manage these files like normal docker-compose "compositions" vs "almost like a docker-compose behavior". It comes in handy to inherit the ports, the 'fargate.deploy' label, and probably more features could be 'composed' rather than copied around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants