dockge icon indicating copy to clipboard operation
dockge copied to clipboard

Can't delete stack if compose.yml has some error in it

Open Nostang3 opened this issue 1 year ago β€’ 9 comments

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

  • [X] I checked and didn't find similar issue

πŸ›‘οΈ Security Policy

Description

I started to create a stack but decided I didn't want it so I tried to delete it. Never deployed it. It wouldn't let me because it looks like it tries to validate the text before allowing me to delete it. It still had some <insert/path/here:/path/to/folder> entries.

πŸ‘Ÿ Reproduction steps

  1. Paste in some default compose
services:
  tinymediamanager:
    image: tinymediamanager/tinymediamanager:latest
    container_name: tinymediamanager
    environment:
      - USER_ID=1000
      - GROUP_ID=100
      - ALLOW_DIRECT_VNC=true
      - LC_ALL=en_US.UTF-8 # force UTF8
      - LANG=en_US.UTF-8   # force UTF8
      - PASSWORD=<password>
    volumes:
      - </path/to/local/data/>:/data
      - </path/to/movies>:/media/movies
      - </path/to/addons/>:/media/tv_shows
    ports:
      - 5900:5900 # VNC port
      - 4000:4000 # Webinterface
    restart: unless-stopped
  1. Save.
  2. Attempt to delete.

πŸ‘€ Expected behavior

Would like to delete the file without having to check if the compose is valid. If I don't want to the stack it shouldn't need to be valid unless I'm missing something.

πŸ˜“ Actual Behavior

Fails to delete with error.

Dockge Version

1.4.2

πŸ’» Operating System and Arch

Trunas Custom App

🌐 Browser

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0

πŸ‹ Docker Version

No response

🟩 NodeJS Version

No response

πŸ“ Relevant log output

service "tinymediamanager" refers to undefined volume </path/to/local/data/>: invalid compose project

Nostang3 avatar Dec 28 '24 23:12 Nostang3

Same issue here. "validating /opt/stacks/aio/compose.yaml: services.nextcloud-aio-mastercontainer.environment.0 must be a string"

Stacks don't appear in Portainer, what gives?

paidlowered avatar Jan 27 '25 00:01 paidlowered

As a simple solution.

Remove the stacks folder

DomiiBunn avatar Jan 27 '25 11:01 DomiiBunn

You can also just replace the compose.yaml with a working one and then delete the stack. Still, it would be nice to be able to delete a β€œstack” with no compose.yaml and .env or one that doesn’t work.

paidlowered avatar Jan 27 '25 14:01 paidlowered

@christmaswreath I agree.

Though this can cause an issue of hanging containers.

DomiiBunn avatar Jan 27 '25 15:01 DomiiBunn

Yep, having this issue as well. Can't delete it, change it, or anything if Dockage gets confused. It says it's maintaining it and inactive, but for some reason has no control over a stopped or ended container...

F1zzyD avatar Apr 06 '25 02:04 F1zzyD

can confirm this is still an issue

jsox79 avatar Jul 22 '25 22:07 jsox79

can confirm this is still an issue

fixed this by switching the compose file with the immich one (or any working one for that matter) and deleting the stack

for example:

services:
  mumble-server:
    image: mumblevoip/mumble-server:latest
    container_name: mumble-server
    hostname: mumble-server
    restart: on-failure
    ports:
      - 64738:64738
      - 64738:64738/udp
      - 6502:6502
    environment:
      - MUMBLE_SUPERUSER_PASSWORD=rsa3^zy9^ygmt43^VRD6F$ # not real password used anywhere
networks: {}

paidlowered avatar Jul 23 '25 04:07 paidlowered

I still have this issue on latest docker version of louislam/dockge

Either with an incorrect compose

2025-11-02T01:08:19Z [GETSERVICESTATUSLIST] ERROR: Error: Process exited with code 1
    at ChildProcess.done (/app/node_modules/promisify-child-process/index.cjs:70:19)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1101:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 1,
  signal: null,
  stdout: '',
  stderr: 'time="2025-11-02T01:08:19Z" level=warning msg="The \\"KOMODO_DB_USERNAME\\" variable is not set. Defaulting to a blank string."\n' +
    'time="2025-11-02T01:08:19Z" level=warning msg="The \\"KOMODO_DB_PASSWORD\\" variable is not set. Defaulting to a blank string."\n' +
    'time="2025-11-02T01:08:19Z" level=warning msg="The \\"KOMODO_DB_USERNAME\\" variable is not set. Defaulting to a blank string."\n' +
    'time="2025-11-02T01:08:19Z" level=warning msg="The \\"KOMODO_DB_PASSWORD\\" variable is not set. Defaulting to a blank string."\n' +
    'time="2025-11-02T01:08:19Z" level=warning msg="The \\"COMPOSE_KOMODO_BACKUPS_PATH\\" variable is not set. Defaulting to a blank string."\n' +
    'time="2025-11-02T01:08:19Z" level=warning msg="The \\"KOMODO_DB_USERNAME\\" variable is not set. Defaulting to a blank string."\n' +
    'time="2025-11-02T01:08:19Z" level=warning msg="The \\"KOMODO_DB_PASSWORD\\" variable is not set. Defaulting to a blank string."\n' +
    'invalid spec: :/backups: empty section between colons\n'

or an empty one

2025-11-02T22:51:33Z [GETSERVICESTATUSLIST] ERROR: Error: Process exited with code 1
    at ChildProcess.done (/app/node_modules/promisify-child-process/index.cjs:70:19)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1101:16)
    at Socket.<anonymous> (node:internal/child_process:456:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:351:12) {
  code: 1,
  signal: null,
  stdout: '',
  stderr: 'empty compose file\n'

thegitslayer avatar Nov 02 '25 22:11 thegitslayer

You could probably just make it so that the docker compose changes to a correct one and then deletes if there's an issue.

paidlowered avatar Nov 02 '25 22:11 paidlowered