Beiträge von DjoeC

    That is what the plugin does for the CHANGE_TO_COMPOSE_DATA_PATH string. I don't have a problem adding more but I just want to know more about how it would be used.

    As mentioned: I would like to use "available items" such as the COMPOSE_FILENAME to use as a "derived" variable (not Global, not Local) to use in compose files. In my case - and I assume many other users work the same way - the COMPOSE_FILENAME shows up again in the compose file. I hate strings which could/should be variables ;)


    For me: I'm relatively new to docker so for now this is the only item I've identified which would make my (and possibly others) life easier / compose files more flexible to use. And maybe there are other ways of accomplishing multiple unique containers based on the same compose file, haven't found that yet but cenrtainly my knowledge is lacking there....


    If you add a variable I would be very happy about it, if not - no hard feelings, for now I was checking the options.


    Thanks!

    Interesting, tested with

    COMPOSE_FILENAME=joomla01

    in global environment variables.


    version: "3.8"

    services:

    "${COMPOSE_FILENAME}":

    hostname: "${COMPOSE_FILENAME}"

    image: "joomla:5"

    container_name: "${COMPOSE_FILENAME}"

    environment:

    - PUID=${PUID}

    - PGID=${PGID}

    - TZ=${TZ}

    - "JOOMLA_DB_HOST=${DB_HOST}"

    - "JOOMLA_DB_NAME=${COMPOSE_FILENAME}"

    At first glance by checking: all substitutions work properly except services Additional property ${COMPOSE_FILENAME} is not allowed on the services tag.


    But I guess the answer is clear: What I would like is not currently possible. It would require pre-processing the compose file before handing it to over to docker.


    Thanks for your help and giving me insights.

    Then you can use the other solution that I already gave you. Create an environment variable in the global environment variables file and use that variable in compose files. As explained here. https://wiki.omv-extras.org/do…l_environmental_variables

    Thanks, I am using globals i.e. for DB_HOSTNAME but don't see how <compose filename> could be a global variable since then it would only be 1 value. I can see it as a variable at the file level but that defeats the purpose as then it's not based on <filename> but a manual entry.


    The only way <compose filename> as a variable would work is if the compose -> file -> check / compose -> file -> up commands would set the (as I understand: non existing) variable value before kicking off.


    But, apologies, I'm not an expert in OMV or Docker so probably I misunderstand something. Will need to rethink my issue and options .

    If you want the persistent data to end up in the CHANGE_TO_COMPOSE_DATA_PATH folder, don't use relative paths, use that variable instead

    - CHANGE_TO_COMPOSE_DATA_PATH/Joomla01/config:/config

    Or the full route:

    - /srv/dev-disk-by-uuid-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Joomla01/config:/config

    This solution does not allow me to reuse the compose file as every data path which includes the filename will need to be hardcoded. I'm trying to avoid that. Compose filename as a variable would be used for: part of data path, container name, (part of) database name, other places which "need" to be "generic" but unique. So having 1 variable in the compose file which will be substituted by <filename variable> would be a major benefit.

    Apologies if I've overlooked something in the docs or wanting to do something silly....


    Are there any default environment variables besides CHANGE_TO_COMPOSE_DATA_PATH for the default Docker folders on the Compose Settings screen? Also does a variable exist for the "current compose filename" to be used when building?


    "./" points to "/<location of compose files>/<filename>"

    "CHANGE_TO_COMPOSE_DATA_PATH" points to "/location of persistent container data"


    I like the ./ default including filename as a path however I cannot find the filename as a variable even though Compose must somehow have it available. I would like my persistent data to end up in "CHANGE_TO_COMPOSE_DATA_PATH/<filename>" to separate the data for example multiple Joomla instances (Joomla01, Joomla02, ...)

    I like the Network tab, like you, I wouldn't mind a Network create, but again it's not a biggie as that's quite a bit extra to program in.

    I'd like a network create. I use it once per docker instance to create a user bridge for communication between named containers which the normal bridge does not provide.


    Per the docker documentation:  Containers on the default bridge network can only access each other by IP addresses, unless you use the --link option, which is considered legacy. On a user-defined bridge network, containers can resolve each other by name or alias.


    Maybe instead of extra buttons (create/delete) store all non compose files in some type of docker (shell?) command file? That could be a solution for everything which does not fit the compose format and yaml checks..