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.
Hi again Matthew,
I left this project and have just returned to it. I still don’t have any ideas as to why my PS library is rebuilding; the library mount point is the same as it was before. My expected behaviour was that when I point the
/ps/library to the directory with the
.photostructure folder containing the
preview folders, it should all just appear but it doesn’t. I can’t figure it out.
The “Edit/Duplicate” then “Deploy” is the right way to do this with Portainer, and I have not experienced any issues doing this with photostructure (or any other containers).
When you say it “started from scratch”, can you elaborate? Do you mean the entire setup flow restarted?
The one thing I wonder between the time you initially created the container and the time you re-created, was there a new release that came out? If so, you may have pulled a new image which may cause some things to happen?
EDIT: either way, I agree with @mrm that it won’t ever mess with your originals folder. But if you want to be extra sure, make the mount read-only.
Thanks @avdp .
So, I did
edit/duplicate then hit
Deploy and when my browser window opened on PS, it was blank and i saw the “Processing” banner starting from the beginning creating all new thumbnails. I panicked and stopped the container. I restarted it a few days ago and just let it do its thing, now it says it’s “done” with 30k+ photos, but there should be plenty more than that (~50k I think). It also hasn’t brought in new photos that are in my input directories and I’m not sure how to poke it to grab them. Up until I did the
edit/duplicate it was working as I’d hoped, so I’m sure I’ve just goosed something with Portainer. Your suggestion about a new release is bound to be correct; I have Watchtower pulling in new images behind the scenes. The problem started when I changed something though, which made me a bit gunshy.
Still, it should be pulling in the photos from the input directories I’ve told it to scan, right? Is there a way to tell PS to have a closer look and pull in the files its missed?
Hmm, I might have tracked down my problem. When I look at the info of an asset, the path shows
/ps/[import folder] rather than
/ps/library/[YYYMDD]. I have “copy assets to library” checked in the settings, but it seems as though PS has assembled a new library directly from the directories I want it to pull from and organise.
So here’s I guess a new question: I assume that my
/ps/library directory is complete as it was before. I should be able to stop and delete this instance from Portainer, set up a new instance of PS, point it to
/ps/library and it will see the assets and thumbnails that were already generated, right? Then it will pull in any assets that have arrived since that library was established?
Thanks again for you help
A lot going on here, I am a bit confused about what you’re describing. So, let’s start from the basic. What version of PS are you running, and what are your configs (screenshots of portainer or the full docker command)?
One thing to note: PhotoStructure will only copy assets into
/ps/originals) if a PLUS license is active. You can check your current subscription status in the about page.