Skip to content

Feature: Add prefix and project name - #13

Open
gauth-fr wants to merge 2 commits into
FoxxMD:mainfrom
gauth-fr:add-prefix-and-project-name
Open

gauth-fr wants to merge 2 commits into
FoxxMD:mainfrom
gauth-fr:add-prefix-and-project-name

Conversation

@gauth-fr

Copy link
Copy Markdown

Checklist before requesting a review

  • hmmm.. did not find :)

Type of change

Please delete options that are not relevant.

  • [ x] New feature (non-breaking change which adds functionality)
  • [x ] This change requires a documentation update

Describe your changes

Add a new env variable STACK_NAME_PREFIX.
If this variable is set, it will prefix the stack name with the provided prefix.
It will also set the project_name to the former stack name.
Otherwise, nothing changes.

This will fix the problem of unique stack name in komodo.
In my case, I have crowdsec on all my server, so import without manual changes won't work.
Now it does :)

I validated that it worked on one of my servers (with STACK_NAME_PREFIX=157)

[[stack]]
name = "157-crowdsec"

[stack.config]
server = "157-lxc-server"
project_name = "crowdsec"
run_directory = "/opt/docker-files/crowdsec"
files_on_host = true
poll_for_updates = true
env_file_path = ".komodoEnv"
additional_env_files = [ ".env.local", ".env" ]

I also update the doc, but not tested..

Disclaimer: this PR has been AI assisted, not vibe coded but still, for transparency.

Issue number and link, if applicable

fix issue 12

This branch has not been deployed

No deployments
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.

FEATURE: add prefix the stack name and set the project_name

2 participants