Still learning how to do all this!
I’m using Portainer to create PS on my Synology NAS, it was all good. I wanted to add new mount points, so I stopped the container, hit “Edit/Duplicate”, added the mount points I wanted and clicked “Deploy”.
Everything looked good, except now instead of reading the 335GB library I’d already imported it started from scratch. What did I do wrong? I stopped the container when I saw this, so I don’t know what state my PS library of thumbnails is in now, but it seems as though my originals directory hasn’t been affected.
How can I write the docker file so that it picks up the organisation and thumbnails that are already there?
For bonus points, how can I also write the docker file so that my PS_ORIGINALS folder goes to Synology’s
/photo location? (I’ve read Hybrid PhotoStructure libraries on converting an existing library to hybrid but don’t understand where to give direction to establish
PS_ORIGINALS apart from
For what it’s worth, I find Portainer’s UI a bit fiddly: if you want, you can click “create stack”, and use a docker-compose configuration: see this page for details.
If everything goes away when you redeploy your container, that sounds like your container’s bind mount for
/ps/library is/was missing.
Mine looks like this:
(your paths don’t have to be the same, of course: they just need to exist).
/ps/library needs to point at a library directory. This should contain a
.photostructure directory, and within that .photostructure directory, there should be
previews directories (and several other bits and bobs).
Previously-imported volumes will only “no-op sync” if your bind-mount the same root directory into your container. The directory that you bind-mount it to doesn’t matter, as long as PhotoStructure can write a .uuid file to the root directory of that bind-mount.
See PhotoStructure | What's a “drive,” or “volume?” for a detailed account of these shenanigans.
I don’t know how happy Synology Photos will be if something else (like PhotoStructure) writes into
/photo. I suspect it may be grumpy, but I haven’t tested it.
That said, you’ll need to
/photo into the PhotoStructure container. In File Station, right-click the photo folder, and pick Properties. The actual path is hiding in the “Location” field. Bind-mount that path as the
source, and, say,
/photo as the destination path in the container.
Add an environment variable,
PS_ORIGINALS, with value
/photo (or whatever you made the destination path).
Note that PhotoStructure has references in your library database to any files it found in the prior library: if you aren’t starting from scratch, you’ll want to run a
rebuild (via the main menu in the PhotoStructure UI) after doing these changes to make sure everything is copacetic.
Thank you so much, Matthew. I always appreciate how attentive and kind you are in helping us get our stuff together! I’ll give this a shot and let you know how I did.
/ps/library mount, I didn’t alter anything from the previous container other than adding two new sources, which is what surprised me when my browser showed an empty screen. I’ll go through these steps and double check everything though and hopefully it’ll all be there. My only real worry is if it overwrites the PhotoStructure originals that are already nicely organised, so I’ll just back that up before I mess with anything.
I’m happy to help!
PhotoStructure doesn’t (currently) move files: it only copies files into your library, and only copies into your library if auto-organize is on, and if the SHA isn’t known to exist in your library directory hierarchy yet. More details about this are here.