From 450f21048ddf8b678d18bca289d821525d404a05 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 8 Jun 2025 16:34:48 +0200 Subject: [PATCH] docs completed --- doc/README.Installation on Dokku.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/README.Installation on Dokku.md b/doc/README.Installation on Dokku.md index 24711a4..5ab434a 100644 --- a/doc/README.Installation on Dokku.md +++ b/doc/README.Installation on Dokku.md @@ -23,6 +23,10 @@ Some of the features that make it a good choice: ## Install with Dokku +(One unsolved issue with Dokku is that I cannot deploy an nginx.conf.sigil +template to customze the Nginx behavior. So using X-Sendfile to improve the delivery +of images is not possible.) + Grab a (virtual) server with at least 3 GB of RAM and 20 GB of SSD space. The application is currently run on a Hetzner server in Germany that costs less than 5€ per month. @@ -39,14 +43,14 @@ For simplicity set a few variables to avoid repetitions during setup: export DEBSHOTS_DB=screenshots_beta export DEBSHOTS_IMAGEPATH=/srv/www/screenshots-beta.debian.net/shrine -Set the email address as a contact for Let's Encrypt: - - dokku letsencrypt:set $DEBSHOTS_HOSTNAME email haas@debian.org - Create a new blank Dokku application: dokku apps:create $DEBSHOTS_HOSTNAME +Set the email address as a contact for Let's Encrypt: + + dokku letsencrypt:set $DEBSHOTS_HOSTNAME email haas@debian.org + Create a new blank PostgreSQL database and link it to the application: dokku postgres:create $DEBSHOTS_DB @@ -58,7 +62,7 @@ Create a directory that will hold the screenshots' files: Make sure that its ownership matches the user's ID used in the Docker container. - chown -R 1000:1000 DEBSHOTS_IMAGEPATH + chown -R 1000:1000 $DEBSHOTS_IMAGEPATH Mount it into the application's path: @@ -80,18 +84,22 @@ To enable single-sign-on with salsa.debian.net, you need to set the secret and k dokku config:set --no-restart $DEBSHOTS_HOSTNAME SALSA_OAUTH_SECRET='…' dokku config:set --no-restart $DEBSHOTS_HOSTNAME SALSA_OAUTH_KEY='…' +Set an SMTP server for notification emails: + + dokku config:set --no-restart $DEBSHOTS_HOSTNAME SMTP_SERVER=dokku2.workaround.org + You also need to get the https://salsa.debian.org/debsso-team/debsso/raw/master/update-debsso-ca script and run it in /etc/nginx to update the certficate and CRL used by the Debian single-sign-on provider. Now make Dokku fetch the Docker image and start a container from it: - dokku git:from-image $DEBSHOTS_HOSTNAME registry.salsa.debian.org/debian/debshots:main-3fd71d03 + dokku git:from-image $DEBSHOTS_HOSTNAME registry.salsa.debian.org/debian/debshots:latest Once the application is running, enter the container and create a new admin user: dokku enter $DEBSHOTS_HOSTNAME - bin/rails 'debshots:create_admin[email,password]' + bin/rails 'debshots:create_admin[john@example.org,mysecret]' ## Cron jobs