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

Folders without compose config visible in UI #183

Closed
2 tasks done
ToshY opened this issue Nov 25, 2023 · 6 comments · Fixed by #299
Closed
2 tasks done

Folders without compose config visible in UI #183

ToshY opened this issue Nov 25, 2023 · 6 comments · Fixed by #299
Labels
bug Something isn't working

Comments

@ToshY
Copy link

ToshY commented Nov 25, 2023

⚠️ Please verify that this bug has NOT been reported before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

After #9 was fixed, Dockge will now startup even if mounted directory has folders without compose config files. However, Dockge will still show these folders in the UI.

image

👟 Reproduction steps

  1. Add a folder without a compose.yaml file in the the mounted directory.
  2. Up dockge.
  3. See the unwanted folder in the sidebar.

👀 Expected behavior

Not showing folders(/files) that are irrelevant for Dockge; if it does not contain a compose configuration file, it should not show up.

😓 Actual Behavior

image

Dockge Version

1.1.1-nightly-20231125142720

💻 Operating System and Arch

Ubuntu 22.04.2 LTS

🌐 Browser

Google Chrome 119.0.6045.160

🐋 Docker Version

24.0.5

🟩 NodeJS Version

No response

📝 Relevant log output

No response

@ToshY ToshY added the bug Something isn't working label Nov 25, 2023
@csjewell
Copy link

I was just going to suggest ignoring .git directories (because I commit my stack into a git repository) but this is more general.

Maybe have a 'ignore this directory' option (and make .* ignored by default?)

@MrNavaStar
Copy link

Maybe a combination of ignoring .* files and also checking for the presence of a compose.yaml?

@almereyda
Copy link

As long as there is a fallback to Docker Compose v1 (docker-compose), and eventually also for compatibility reasons, presence of the appropriate file should be validated by docker compose config. docker-compose.{yml,yaml} are still valid file names for legacy projects.

I don't know about compose.{yml,yaml}, though.

@MrNavaStar
Copy link

My only worry with validating the files is that it will probably slow down on large setups. I believe the files are walked through on every page reload, so I imagine it would cause some noticeable lag when opening the page.

@Ozy-Viking
Copy link
Contributor

Ozy-Viking commented Dec 15, 2023

I am checking for any of: docker-compose.{yml,yaml} or compose.{yml,yaml}. My approach was asserting that any of the 4 file exists then if it errors it returns false otherwise returns true. In essence O(4n) compared to the original O(n) .

@quantumfrost
Copy link

I am checking for any of: docker-compose.{yml,yaml} or compose.{yml,yaml}. My approach was asserting that any of the 4 file exists then if it errors it returns false otherwise returns true. In essence O(4n) compared to the original O(n) .

Another common pattern is to use a project_name.{yml,yaml} file, like dockge/dockge.yaml and then launch with docker compose -f option. Could that be supported too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants