Open JohnDoe-dev-spec opened 9 months ago
Noticed this too.
Need an example, I cannot reproduce. Still there after refresh.
I can't seem to reproduce it either anymore.
It did disappear!
Close this off for now and if it happens again i will re-open with example.
Thanks!
It's seams like that this is still an issue. Steps to reproduce:
version: "3.8"
services:
nginxpm:
image: jc21/nginx-proxy-manager:latest
ports:
- 80:80
# test comment
- 443:443
volumes:
- nginx_data:/data
- nginx_letsencrypt:/etc/letsencrypt
restart: unless-stopped
volumes:
nginx_data:
nginx_letsencrypt:
I can confirm that it's still happening. The lines disappear as soon as you start editing the stack.
Edit to say that only certain comments will disappear, as the one provided in this comment. Commenting out the whole ports
entry will not be affected.
@louislam Can we re-open this issue please? The steps given by @marvint24 also are reproduceable on my end.
Happens reliably when commenting out a label.
was looking in to this because its really annoying. it happens on this parseDocument function call https://github.com/louislam/dockge/blob/109222f0248e17935db439d2db0eb421194007da/frontend/src/pages/Compose.vue#L703
it can deal with comments at the start and end of an array but not in the middle so
label:
# comment at start of object
- label.on.container=true
# comment at middle of object
- label.on.container2=false
# comment at end of object
would remove the middle comment but the start and end ones would stay leading to the front-end displaying
label:
# comment at start of object
- label.on.container=true
- label.on.container2=false
# comment at end of object
to be clear the comment is actually there in the file until you save/deploy it again after editing
its just failing at the yaml > object
step to making it editable in the browser
a work around for now is to do like so
labels:
# comment at start of object
- label.on.container=true
- a # comment at middle of object
- label.on.container2=false
- b # comment at middle2 of object
- c # comment at middle3 of object
- d # comment at middle4 of object
- label.on.container3=false
# comment at end of object
this should work fine for both labels and environment as the a,b,c,d values are just ignored if they are not used
I can confirm the workaround @Robonau suggested, lines which are only a comment get removed when you edit the compose. except if they are placed right below a section start or right at its end.
And comments placed to the right of a compose parameter are left untouched.
Also, upon editing the template the comments which do not get removed have their indentation changed like so (probably by design, but as they being comments I did not expect it to happen):
An saved example compose excerpt:
volumes: # to the right of section name
# at beginning of section
- ./data:/data
# at end of section
When I edit it:
volumes:
# to the right of section name (moved down and got indented to align with the existing parameter)
# at beginning of section (indented to align with the existing parameter )
- ./data:/data
# at end of section (indented to align with the section title)
β οΈ Please verify that this bug has NOT been reported before.
π‘οΈ Security Policy
Description
I have created a new stack with Dockge and commented out some lines in the YAML with #
I then start/deploy the stack and it creates successfully and refreshed the page. The compose.yaml no longer shows me the commented out line, it disappears.
I then login to the host and nano compose.yaml and i can see the commented out line there but not in Dockge.
π Reproduction steps
Create stack and comment out line Deploy/start stack Refresh Page
Line disappears
π Expected behavior
The commented out line still to appear in my compose.yaml so i can reintroduce it if i want to.
π Actual Behavior
Commented out line disappears from Dockge GUI
Dockge Version
1.1.1.1
π» Operating System and Arch
DietPI Debian
π Browser
Firefox/Chrome
π Docker Version
Docker 24.0.7
π© NodeJS Version
N/A
π Relevant log output
No response