I have a Bluesky PDS running successfully. Now I’m trying to set up GoToSocial, an ActivityPub server that also uses sqlite. When I run

sudo docker compose up -d

I get the following error in the docker log for GoToSocial:

Error executing command: error creating dbservice: sqlite ping: Unable to open the database file (SQLITE_CANTOPEN)

Is this more likely to be a conflict between the two docker applications or something specific to GoToSocial? (I’ve gone through the sqlite issues I’ve been able to find in GoToSocial’s GitHub.)

If something to do with running sqlite in two containers, do you have any tips to resolve the issue?

  • elmicha@feddit.de
    link
    fedilink
    arrow-up
    3
    ·
    3 months ago

    It’s specific to your GoToSocial container. It wants to write a file and cannot write it, probably because you didn’t mount the directory, or the directory is not writable for the user in the container. Have a look at the docs.

    • nickwitha_k (he/him)@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      ·
      3 months ago

      This is the most likely. You need to ensure that the volume is mounted AND that permissions are set correctly. Docker doesn’t care about username. It cares about user ID. So, if the dir/file ownership and mode does not give sufficient permissions to the UID/GID of the user in the container, you’ll need to correct that.

      • jadero@programming.devOP
        link
        fedilink
        arrow-up
        2
        ·
        3 months ago

        Oh, that user ID must be the answer. I was wondering what those numbers were ☺️

        More digging to figure out what the appropriate user id is…

        • TechAdmin@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          3 months ago

          To find the numerical user ID (uid) and group ID (gid) of an account or group you can use the ‘id’ command such as: id root

          As for which one to use on ownership and docker, that will vary widely and would require knowing more about how things are setup. I’d try to use the same one that is running the docker commands.

          • jadero@programming.devOP
            link
            fedilink
            arrow-up
            3
            ·
            3 months ago

            Thanks! Once I knew that there was such a thing, a bit of online searching got that part of it sorted. And took me into what I hope is a productive rabbit hole of permissions management. :)

    • jadero@programming.devOP
      link
      fedilink
      arrow-up
      2
      ·
      3 months ago

      Ok, thanks. I was hoping that it was specific to GTS, because that’s more my speed. I’ve been through the docs, but obviously not carefully enough! I’ll give it another go…

  • kim@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    are you sure the volume the sqlite database file is in has the correct permissions? not just in the container, but on the host, does the appropriate docker user id have permission to see what’s in the folder? i’ve been caught out myself on that before when files in the folder had correct permissions, but the containing folder for them couldn’t be accessed :p

    • jadero@programming.devOP
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      That’s what I worked through this morning. I learned elsewhere in these comments that users have both names and IDs and that docker references IDs.

      I’ve changed ownership of the files and folders a few times. First to match the default setting in docker-compose.yaml, then as I tried different user IDs. Always the same message.

      I did additional research and found references to something known as “mounting volumes”, but have not yet had a chance to explore that angle further. It’s not mentioned in the GTS documentation that I can see, so I just assumed (I know…) that the .yaml file was taking care of it.

      At this point, I suspect that there is something else going on, possibly with ports. I had to do a bit of fiddling with ports to kill a bind error resulting from the fact that there is another service hooked up to ports 80 and 443. I’m only guessing, but maybe it’s unable to create the database because it needs to do so via those ports. That doesn’t sound quite right to me, but it’s not like I have any real clue!

      One thing I noticed is that docker-compose is recommended by GTS, so I installed it and that really blew up in my face, so I went back to docker compose as I’ve used elsewhere.

      Research continues…