ctk icon indicating copy to clipboard operation
ctk copied to clipboard

Better handling of multiple commands.

Open davidfic opened this issue 5 years ago • 4 comments

When bulk adding commands it would be great if you parsed them to show up in the more traditional docker-compose style with each on on a separate line instead of a long string as the formatting makes it very hard to read

davidfic avatar Jun 01 '20 21:06 davidfic

@davidfic do you mean something like this?

command: >
    bash -c "python manage.py migrate
    && python manage.py runserver 0.0.0.0:8000"

or

command: bash -c "
    python manage.py migrate
    && python manage.py runserver 0.0.0.0:8000
  "

corpulent avatar Jun 02 '20 07:06 corpulent

I was thinking more like this

There are plenty of ways to do it. The way you currently have the interface it makes it hard to see when the command list gets long so anyway to make it more readable would be great.

davidfic avatar Jun 02 '20 13:06 davidfic

I will release a global settings functionality to set global env vars so users can use them across the app using ${VAR_NAME} notation Will include other configurations like displaying commands as a list or inline in the generated compose.

In the short term I will open up the command input to be a text field for better readability.

Thanks for this suggestion. Ill keep this open for now.

corpulent avatar Jun 04 '20 14:06 corpulent

@davidfic I deployed some improvements for parsing the command and entrypoint strings. Take a look here https://app.nuxx.io/?import_url=https:%2F%2Fraw.githubusercontent.com%2Fdavidfic%2FVPN-media-stack%2Fmaster%2Fdocker-compose.yml

The input fields for both allow the user to break line, or add commas. I am not sure what is the best middle ground to satisfy all cases. But maybe you can play around with it on a "saved" project, a project being imported will import your yaml nearly perfectly into the code view.

Here are some strings that you can paste into the command field, and take a look at the output.

["--global.checkNewVersion=true",
"--entryPoints.http.address=:80",
"--entryPoints.traefik.address=:8080"]
--global.checkNewVersion=true
--entryPoints.http.address=:80
--entryPoints.traefik.address=:8080
['--globaltrue','--entryPoints=:80','--entryPoint=:8080']

corpulent avatar Jun 20 '20 19:06 corpulent