Remix.run Logo
Show HN: DD Photos – static photo albums, now with Docker and 1-command deploy(ddphotos.donohoe.info)
2 points by dougdonohoe 5 hours ago

I first posted about DD Photos 50 days ago[1], when I first open-sourced it. A lot of improvements have been made since then (hero image, site/album passwords, ngnix support, UI refinements, custom HTML/CSS, s3 deployments, and more).

However, I feel two significant additions are worth sharing (Docker and Surge).

Using DD Photos directly from source is very developer-heavy. You have to clone the repo and install Go, Node, libvips and all the dependencies. It's a lot to get started.

I thought why not pre-package everything all set to go? So DD Photos now has "Docker mode". An init command does the scaffolding, installing a 'ddphotos' wrapper script, and then there are a handful of simple commands to build the site.

mkdir ~/my-ddphotos

docker run --rm -v ~/my-ddphotos:/ddphotos dougdonohoe/ddphotos init

cd ~/my-ddphotos

./ddphotos photogen # resize images and create index files

./ddphotos run # run dev server at http://localhost:5173

./ddphotos build # build static site

./ddphotos serve # serve static site via Apache at http://localhost:8000

The second barrier is deploying a site. I use AWS s3/CloudFront/Route53 - which again is non-trivial to setup. I then discovered surge.sh, a free and easy way to deploy static sites in minutes. So I added support for it:

./ddphotos export --copy

surge --domain my-unique-site.surge.sh export/my-photos

Result of above: https://ddphotos-test-docker.surge.sh/

Anyway, the simplicity of this feels like a game-changer, which is why I wanted to share.

Code: https://github.com/dougdonohoe/ddphotos

[1] https://news.ycombinator.com/item?id=47322838