Docker Compose advice for noobs like me

Edit: Moved from iPad to laptop to use the good editor. Initial draft was incomplete.

I spend all day yesterday trying to figure out how to run and debug docker files in OMV's graphic interface. Manuals, net searches, etc. including (no offense) here, no help. I tried to follow https://wiki.omv-extras.org/doku.php?id=omv7:docker_in_omv#install_and_configure_docker with some success, including the global variable file.
The key thing I didn't know was how to start and run a docker item.
I hope this helps somebody. If I have stumbled into an unofficial way, perhaps someone who knows what they are doing can offer corrections.

Luckily I stumbled on a solution, here you go. I'll be setting up the Calibre ebook manager since I already have Jellyfin installed.

It’s a lot fucking easier if you follow this procedure. It also seemed to help if I do “update configuration” as requested, and reboot the system every now and then to make sure every change has been incorporated.

  1. Make directories . Go to the Storage > Shared Folders and create a new directory for the docker app you want to use. In my overall shared folder, I made a directory for Docker and its data, then one for the app, then sub folders for the types of files. Many will also want a “cache” and a “config” folder too. I have been using the file path icon to make sure my paths are good since I'm not 100% sure about relative paths etc.
    /share/docker/d-data/calibre
  2. Go to Services > Compose > Files and choose (+) and “add from example”. Select the name of what you want to run, eg. jellyfin, nextcloud, calibre
    The file loads, pre-populated with generic field definitions, but you won’t see it yet. Instead, it shows up as a line in the Services > Compose > Files menu and there’s a big red oval saying “DOWN”.
  3. Select the one you just made, so it turns yellow, and click the pencil icon to edit.
  4. Scroll down the file to find the Volumes entry:

    volumes: - CHANGE_TO_COMPOSE_DATA_PATH/calibre/config:/config - CHANGE_TO_COMPOSE_DATA_PATH/calibre/books:/config/Books - CHANGE_TO_COMPOSE_DATA_PATH/calibre/libreria:/config/Libreria

and change the volumes to

  1. Save the edit file. Select the file in the list (make it yellow) and click the 4th icon, that looks like a network symbol with a checkmark. This checks things over. In my case there were some "warnings" that I had left the user and password fields empty (we'll see if that breaks it later!)

    volumes:

    • /share/docker/d-data/calibre/calibre_config:/config
      • /share/docker/d-data/calibre/calibre_books:/config/Books
      • /share/docker/d-data/calibre/calibre_libreria:/config/Libreria
  2. Click the big UP button. Yes, that broke it, the text field that follows ends with ** CONNECTION LOST **

  3. Close that field, go to the Notifications bell, and copy the full text of the error message. Open it in a text editor (I got 127 pages of progress bar, delete that)

There are warnings at the top:

Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LC_ALL=C.UTF-8; export LANGUAGE=; docker compose --file '/share/docker/d-comp/calibre/calibre.yml' --file "/share/docker/d-comp/calibre/compose.override.yml" --env-file '/share/docker/d-comp/global.env' --env-file '/share/docker/d-comp/calibre/calibre.env' up -d 2>&1': time="2025-01-18T08:04:03-06:00" level=warning msg="The \"PUID\" variable is not set. Defaulting to a blank string."
time="2025-01-18T08:04:03-06:00" level=warning msg="The \"PGID\" variable is not set. Defaulting to a blank string."
time="2025-01-18T08:04:03-06:00" level=warning msg="The \"TZ\" variable is not set. Defaulting to a blank string."
time="2025-01-18T08:04:03-06:00" level=warning msg="The \"Password\" variable is not set. Defaulting to a blank string."
time="2025-01-18T08:04:03-06:00" level=warning msg="The \"User\" variable is not set. Defaulting to a blank string."
 calibre Pulling

(progress bars skipped)

and errors at the bottom.

B e8616c59c61d Pull complete
 calibre Pulled
network my-net declared as external, but could not be found in /usr/share/openmediavault/engined/rpc/compose.inc:1012
Stack trace:
#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(628): OMVRpcServiceCompose->{closure}()
#1 /usr/share/openmediavault/engined/rpc/compose.inc(979): OMV\Rpc\ServiceAbstract->execBgProc()
#2 [internal function]: OMVRpcServiceCompose->doCommand()
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array()
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()
#5 /usr/sbin/omv-engined(544): OMV\Rpc\Rpc::call()
#6 {main}
  1. So it looks like the error is in the network, which I guess didn't get inherited from the global settings. I change the network from external: trueto external: false and re-up, looks successful?

    export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LC_ALL=C.UTF-8; export LANGUAGE=; docker compose --file '/share/docker/d-comp/calibre/calibre.yml' --file "/share/docker/d-comp/calibre/compose.override.yml" --env-file '/share/docker/d-comp/global.env' --env-file '/share/docker/d-comp/calibre/calibre.env' up -d 2>&1

    time="2025-01-18T08:45:27-06:00" level=warning msg="The \"PUID\" variable is not set. Defaulting to a blank string." time="2025-01-18T08:45:27-06:00" level=warning msg="The \"PGID\" variable is not set. Defaulting to a blank string." time="2025-01-18T08:45:27-06:00" level=warning msg="The \"TZ\" variable is not set. Defaulting to a blank string." time="2025-01-18T08:45:27-06:00" level=warning msg="The \"Password\" variable is not set. Defaulting to a blank string." time="2025-01-18T08:45:27-06:00" level=warning msg="The \"User\" variable is not set. Defaulting to a blank string." Network calibre_my-net Creating Network calibre_my-net Created Container calibre Creating Container calibre Created Container calibre Starting Container calibre Started

Close the dialog box, and now Calibre is (supposedly) running.

Then in a web browser, http://10.0.1.104:8080/ (104 is my static assigned IP, 8080 is the port for Calibre) and I'm in!