Note: the following post is for the as-yet-unreleased next version of PhotoStructure, v2.1
As I’ve been testing the new v2.1 alpha build on docker, every time I spin up a new container, I think “gosh, can’t this be made simpler?” I think it can.
PhotoStructure’s docker setup currently requires at least 4 bind mounts:
- The library directory,
- The scratch directory,
- The system configuration directory,
- The log directory,
There are a couple constraints on these directories:
- The library directory needs to have a bunch of free disk space
- The scratch disk must be on a local disk, and cannot be a disk using a “union” or
More details about these volumes are in the docker setup page.
PhotoStructure v2.1 will require a
/ps/library bind-mounted volume. Everything else is optional.
If you’ve got a big local disk that you want everything to live in, just bind-mount that one directory, and you’re done. Like this:
docker run \ --stop-timeout 120 \ -v "$HOME"/PhotoStructure:/ps/library \ photostructure/server:stable
Here’s how v2.1 figures out directories when running in Docker; the first directory that exists, wins.
For your library directory, PhotoStructure still defaults to
/ps/library (but can be changed from the default by setting
For your scratch directory, if
/ps/tmp is a read/writable directory, return that. Otherwise, if
/ps/cache is a read/writable directory, return that. Otherwise, return
For your system settings: if
/ps/config is a read/writable directory, return that. Otherwise, return
For your log files: if
/ps/logs is a read/writable directory, return that. Otherwise, return
PhotoStructure still needs to have a cache dir that supports memory mapping, so if you want to store your library on
mergefs or a union filesystem, you can bind-mount that volume to
/ps/library, but you also need to provide a standard, local (fast!) filesystem bind-mounted to
So, docker users: Does this make sense? Will you use this?
Feedback is welcome: it’s easy to change stuff now, before I have to support backward compatibility…
20220129: prior version referenced the default directory as
/ps/default, but to keep things simple, I’ve renamed it
/ps/library. The thinking is that you have to have a library directory, but everything else is an implementation detail.
20220130: I’ve shoved the scratch, logs, and config directory to live under
/ps/library/.photostructure to minimize the number of directories I’m writing into.