Trying (and failing) to create a valid docker compose YAML file for damselfly

Hi

I’m trying to get damselfly to work with TrueNAS Scale using docker compose. I’m not very familiar with it and sadly the error messages you get are very cryptic as they are all wrapped up in the python code trying to execute them. Can anyone see where I’m going wrong here?

services:
  damselfly: 
    container_name: damselfly
    image: webreaper/damselfly
    enviroment:
      - PUID=568
      - PGID=568
    ports:
      - 6363:6363/tcp
    volumes:
      - /mnt/SSD/apps/damselfly/config:/config
      - /mnt/SSD/apps/damselfly/thumbs:/thumbs
      - /mnt/SSD/pictures:/pictures 
    restart: unless-stopped
	cpus: 2

Good morning,
Portainer is much more explicit for docker compose errors.
A suggestion, install Portainer from the Truenas catalog and use Docker Compose in Portainer (menu Stacks). This will give you the error in your .yml file.
In my Portainer it looks like
cpus: 2
is not correct

@claude I doubt the issue is this variable. It’s lifted straight from the YAML file i used to deploy another custom container and as far as I can tell from the docker compose documentation it’s used correctly. I read the documentation as the maximum cpus value being equal to the number of threads you have so in my case 24.

I might try the portainer approach just for the improved feedback, but I really don’t want to use a container in a container setup for all my docker apps so I’m hoping better feedback when creating custom containers will come with a future TrueNAS update. As well as some reasonable documentation about the variables you should configure for any custom container setup regardless what the source image is

With tab character
image

Without tab character
image

Replace tab character by spaces.

A YAML file use spaces as indentation, you can use 2 or 4 spaces for indentation, but no tab . In other words, tab indentation is forbidden.

You are free not to use Portainer or anything else, but Portainer might give you the error.

Honestly thought I had safeguarded myself against adding a tab in there as I ran the file through an online validator. But apparently it was not to concerned with tabs over spaces. I learned my lesson. From here on out i’ll be using something that displays tabs and spaces using symbols. Thank you for helping me out @claude.

1 Like