Skip to content

Conversation

@Pmayors
Copy link

@Pmayors Pmayors commented Nov 13, 2025

What does this PR do?

This adds a new -f (or --file) flag to the ff init command. This new feature allows a user to provide a path to their own custom docker-compose.override.yml file, which is then copied into the new stack's directory.

This is a helpful feature for DevOps and power users who want to customize their stack (e.g., change ports, add new services) at the moment of creation.

Which issue does this PR fix?

Closes: #184

How was this tested?

I tested this locally by:

  1. Building the new executable: go build .
  2. Creating a test file: touch mytest.yml
  3. Running the init command with the new flag: ./firefly-cli.exe init -f mytest.yml
  4. I confirmed that the mytest.yml file was successfully copied to the new stack's directory (~/.firefly/stacks/teststack) as docker-compose.override.yml.

Copy link
Contributor

@EnriqueL8 EnriqueL8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr @Pmayors - one suggestion on the name of the flag

initCmd.PersistentFlags().StringVarP(&initOptions.FireFlyVersion, "release", "r", "latest", fmt.Sprintf("Select the FireFly release version to use. Options are: %v", fftypes.FFEnumValues(types.ReleaseChannelSelection)))
initCmd.PersistentFlags().StringVarP(&initOptions.ManifestPath, "manifest", "m", "", "Path to a manifest.json file containing the versions of each FireFly microservice to use. Overrides the --release flag.")
initCmd.Flags().StringVarP(&overrideFile, "file", "f", "", "Custom docker-compose.override.yml file to copy")
initCmd.PersistentFlags().BoolVar(&promptNames, "prompt-names", false, "Prompt for org and node names instead of using the defaults")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we could rename this to be more specific this is a docker compose override file instead of just -f or --file . The CLI uses files for all sorts of things including overriding the manifest.json which contains the image.

maybe --override-file

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

Successfully merging this pull request may close these issues.

Add an "init" option to copy in a custom docker-compose.override.yml file

2 participants