For user-readable files or media I store them under ~/docker/data, and for everything else I store them under ~/docker/stacks/[service] where ~/docker/stacks is maintained by Dockge.

Is there a better way to do this?

  • DasFaultier@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    19
    ·
    1 day ago

    I tend to use /opt/[service]/, like for example /opt/forgejo/. It’s outside of any user’s Homedir and it seems to fit into what the FHS 3.0 (Filesystem Hierarchy Standard) defines.

    • eli@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      22 hours ago

      I do this as well. Though if I’m deploying a stack(grafana+prometheus+cadvisor) then it all goes under a single folder like /opt/stackname/

      But if I’m running multiple services that are mostly separate or not in the same stack then they go in their own folders like /opt/nginx/ and /opt/grafana/

    • SolidGrue@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 day ago

      I use /srv/[service] for services by the same logic, and leave /opt for local user apps. It’s kind of a coin toss though. On another day I night have decided differently.