DockStation / dockstation

DockStation is developer-centric application to managing projects based on Docker. Instead of lots of CLI commands you can monitor, configure, and manage services and containers using just a GUI.
https://dockstation.io/
2.15k stars 107 forks source link

Option to make project files read-only #163

Open roynasser opened 5 years ago

roynasser commented 5 years ago

Hi,

When doing some actions within dockstation the docker-compose and/or dockerfile are being rewritten. Problem is that some formatting is lost (no big deal) but it seems to be removing all comments (not sure if there is any logic applied?)

Anyways, it would be good to a) warn users that their files will be overwritten and any change isnt just to runtime (for applicable changes), and b) have an option to disable this and warn for any features that wont work...

Sometimes devs need to run with the Dockefiles/docker-compose they are given... if each one's dev environment starts messing with them it causes a big issue for the ops team to make the development enviornment true to prodjuction again...

(as another note, I'd like to suggest some form of zoom for editing the scheme? i love the idea, but it very hard to see even worse to manipulate the boxes)

igor-lemon commented 5 years ago

Hi @RVN-BR

Yep, we know about it problem. We're thinking how to resolve it easier but I think need to make a custom parser. The problem throw because we have next logic: get a YAML config => parse config => change some value => write changed config to file. After parsing YAML to JSON we lost the comments and formatting. I never worked with AST but I think need to start :D

Ok. We'll think about it. Are boxes small or big for your needs?

roynasser commented 5 years ago

Hi @igor-lemon

Would an idea be to parse the file "block by block"? (dont know if that is possible using the current parser), but maybe you can output parts of it, and regex the rest... that would at leastr help with commented "blocks", althouhg it wouldnt help inline comments...

About the schema, the boxes are too large for us (too many boxes to fit on one screen)..., but the feature is quite cool imo! Something I havent really seen before and is very interesting, helps show new developers around, share thoughts on topology, microservice arquitecture tests, etc!

RavilN commented 5 years ago

Hi, Just recently started using DockStation, and it is very impressive, thank you! I had this issue too, my comments were lost. Sometimes I comment actual configuration lines too temporarily, for debugging, and when they are lost not convenient. Voting to resolve this issue! (could not find feature to vote here in GitHub).

igor-lemon commented 5 years ago

Hi @RavilN Thanks for the feedback. I know about this problem but we don't solve this issue yet. We couldn't find some good and stable lib with AST support. I hope we'll find some solution.

igor-lemon commented 5 years ago

Wow. I have good news! We found a lib for flexible work with YAML AST. But I need your help. Please write to test your docker-compose configs as examples. It should help us so much.

roynasser commented 5 years ago

Cool, I can test... is it on the main package?

RavilN commented 5 years ago

Hi,

I am using this docker-compose file: https://github.com/onewayautomation/OPC-UA-Data-Logger/blob/master/docker/docker-compose.yml I will do testing when updated version of DockStation is available. Thank you, Ravil

bvgusak commented 4 years ago

Hi!

DockStation is an amazing tool and works good. But this issue with changing compose file is a little bit annoying. Can it be fixed in the nearest future?

igor-lemon commented 4 years ago

@bvgusak Hi. Yep, we remade a parser from dumb read-> parse -> change -> rewrite all document to parser with AST, which re-writes just changed value and don't touch all document. But we're testing 2+ months the app, and I don't know how fast we release the new version.