From c75beda743dfd6af63f512e928d0889d9ead3973 Mon Sep 17 00:00:00 2001 From: Ken Date: Sat, 9 May 2026 04:41:03 +0000 Subject: =?UTF-8?q?Initial=20commit=20=E2=80=94=20Albumen=20photo=20album?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ruby/Sinatra self-hosted photo album with directory hierarchy, per-photo captions and visibility, lightbox, slideshow, admin UI, and Let's Encrypt HTTPS via Apache reverse proxy on prouter. Co-Authored-By: Claude Sonnet 4.6 --- config/albumen.service | 19 +++++++++++++++++++ config/nginx-albumen.conf | 18 ++++++++++++++++++ config/puma.rb | 9 +++++++++ 3 files changed, 46 insertions(+) create mode 100644 config/albumen.service create mode 100644 config/nginx-albumen.conf create mode 100644 config/puma.rb (limited to 'config') diff --git a/config/albumen.service b/config/albumen.service new file mode 100644 index 0000000..9fea12f --- /dev/null +++ b/config/albumen.service @@ -0,0 +1,19 @@ +[Unit] +Description=Albumen photo album (Puma) +After=network.target + +[Service] +Type=simple +User=albumen +Group=albumen +WorkingDirectory=/opt/albumen +Environment=RACK_ENV=production +Environment=MEDIA_ROOT=/var/albumen +Environment=CACHE_ROOT=/opt/albumen/cache/thumbs +Environment=CONFIG_PATH=/opt/albumen/config.yml +ExecStart=/usr/local/bin/bundle exec puma -C config/puma.rb +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target diff --git a/config/nginx-albumen.conf b/config/nginx-albumen.conf new file mode 100644 index 0000000..d540bcd --- /dev/null +++ b/config/nginx-albumen.conf @@ -0,0 +1,18 @@ +server { + listen 80; + server_name albumen.jots.org; + + client_max_body_size 0; # no limit for large video uploads via rsync + proxy_read_timeout 300s; + proxy_send_timeout 300s; + + location / { + proxy_pass http://127.0.0.1:4567; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_buffering off; + } +} diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 0000000..d60c643 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,9 @@ +workers 1 +threads 4, 8 + +bind 'tcp://127.0.0.1:4567' +environment ENV.fetch('RACK_ENV', 'development') + +pidfile '/opt/albumen/tmp/puma.pid' +state_path '/opt/albumen/tmp/puma.state' +stdout_redirect '/opt/albumen/log/puma.stdout.log', '/opt/albumen/log/puma.stderr.log', true -- cgit v1.2.3