1
0
Fork 0
mirror of https://github.com/louislam/dockge.git synced 2026-03-03 02:06:55 -05:00

incorrect modifications of compose.yaml for preview #241

Open
opened 2026-02-20 13:12:30 -05:00 by deekerman · 0 comments
Owner

Originally created by @B17C0D3 on GitHub (Dec 30, 2025).

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

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

I started to use the configs within the compose file.
The mode needs to be declared for prometheus. Otherwise the container crashes.
The compose file is saved correctly with the leading 0.
But the preview in dockge is without. If not added on the next edit, the leading 0 is missing and the mode isn't set correctly on startup.
Because the base for the edit isn't the saved compose file, but the preview in the browser.
Without the leading 0, the mode is not set correctly.
The leading 0 should not be removed on display in the browser.

👟 Reproduction steps

  1. create a compose file with configs and define the mode of the config file.
  2. safe and start the compose file, confirm the function
  3. refresh the page and the leading 0 in mode vanishes
  4. edit any line and save the changes
  5. start the compose file. prometheus crashes on startup, because the mode is not set correctly

example compose file

configs:
  prometheus-config:
    content: |
      global:
        scrape_interval: 15s
        evaluation_interval: 15s
      scrape_configs:
        - job_name: 'fbox'
          scrape_interval: 5s
          static_configs:
            - targets: ['fb-exporter:9042']

services:
  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    hostname: prometheus
    restart: always
    configs:
      - source: prometheus-config
        target: /etc/prometheus/prometheus.yml
        mode: 0777
    volumes:
      - /mnt/user/appdata/prometheus:/prometheus
    networks:
      - proxy

networks:
  proxy:
    external: true

👀 Expected behavior

The leading 0 should not be removed on display in the browser.
Without the leading 0, the mode is not set correctly.

😓 Actual Behavior

Removes the leading 0 in mode

    configs:
      - source: prometheus-config
        target: /etc/prometheus/prometheus.yml
        mode: 777

Dockge Version

1.5.0

💻 Operating System and Arch

Linux unraid 6.12.54

🌐 Browser

Firefox 146.0

🐋 Docker Version

Docker version 27.5.1, build 9f9e405

🟩 NodeJS Version

📝 Relevant log output


Originally created by @B17C0D3 on GitHub (Dec 30, 2025). ### ⚠️ Please verify that this bug has NOT been reported before. - [x] I checked and didn't find similar issue ### 🛡️ Security Policy - [x] I agree to have read this project [Security Policy](https://github.com/louislam/dockge/security/policy) ### Description I started to use the configs within the compose file. The mode needs to be declared for prometheus. Otherwise the container crashes. The compose file is saved correctly with the leading 0. But the preview in dockge is without. If not added on the next edit, the leading 0 is missing and the mode isn't set correctly on startup. Because the base for the edit isn't the saved compose file, but the preview in the browser. Without the leading 0, the mode is not set correctly. The leading 0 should not be removed on display in the browser. ### 👟 Reproduction steps 1. create a compose file with configs and define the mode of the config file. 2. safe and start the compose file, confirm the function 3. refresh the page and the leading 0 in mode vanishes 4. edit any line and save the changes 5. start the compose file. prometheus crashes on startup, because the mode is not set correctly example compose file ``` configs: prometheus-config: content: | global: scrape_interval: 15s evaluation_interval: 15s scrape_configs: - job_name: 'fbox' scrape_interval: 5s static_configs: - targets: ['fb-exporter:9042'] services: prometheus: image: prom/prometheus:latest container_name: prometheus hostname: prometheus restart: always configs: - source: prometheus-config target: /etc/prometheus/prometheus.yml mode: 0777 volumes: - /mnt/user/appdata/prometheus:/prometheus networks: - proxy networks: proxy: external: true ``` ### 👀 Expected behavior The leading 0 should not be removed on display in the browser. Without the leading 0, the mode is not set correctly. ### 😓 Actual Behavior Removes the leading 0 in mode ``` configs: - source: prometheus-config target: /etc/prometheus/prometheus.yml mode: 777 ``` ### Dockge Version 1.5.0 ### 💻 Operating System and Arch Linux unraid 6.12.54 ### 🌐 Browser Firefox 146.0 ### 🐋 Docker Version Docker version 27.5.1, build 9f9e405 ### 🟩 NodeJS Version - ### 📝 Relevant log output ```shell ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dockge-louislam#241
No description provided.