From 98af99de9faf38f46eb9549bf8ae88376830fbeb Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Thu, 22 May 2025 00:31:35 +0200 Subject: [PATCH] slight corrections --- doc/README.Development.md | 37 +++++++++++++++++++++-------- doc/README.Installation on Dokku.md | 10 ++------ 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/doc/README.Development.md b/doc/README.Development.md index cee8fe3..c6d8477 100644 --- a/doc/README.Development.md +++ b/doc/README.Development.md @@ -3,20 +3,13 @@ This document helps you set up the *debshots* Rails application on your own Debian system if you intend to work on the source code. -## Preparing the development environment - -Most steps required to deploy the application (for production use) are automated -using an Ansible playbook that you find at ./ansible/debshots.yml - -The following section documents the steps you need to do to get the application -running in development mode. If you are a little experienced in developing Rails -applications you may know most of that already. +# Preparing the development environment ## Install dependencies -These APT-gettable packages are probably required to run the application: +These APT-gettable packages are required to run the application: - sudo apt install ruby sudo libssl-dev libreadline-dev \ + sudo apt install ruby-dev libssl-dev libreadline-dev \ zlib1g-dev libbz2-dev libpq-dev git imagemagick ## Prepare PostgreSQL database server and user @@ -119,6 +112,10 @@ Get the latest information on packages from the Debian repositories. Point your browser to http://localhost:3000/ and you will see the web site. +## Recommended: Create an admin user + + bundle exec rake 'debshots:create_admin[john@example.org,mydirtysecret]' + ## Optional: Tidy up the screenshot data bundle exec rake debshots:remove_broken_screenshots @@ -135,3 +132,23 @@ To run the Rails server in development mode on port 3001 with HTTPS: rails s puma -b 'ssl://0.0.0.0:3001?key=nginx/localhost.key&cert=nginx/localhost.crt&verify_mode=none' This is required to be able to use single-sign login with the different services. + +# Production installation + +Building a Docker image is the recommended way to prepare Debshots for production. + + docker build -t debshots . + +Use docker-compose.yml as a starting point to try it out. + +In the last 10 years, Debshots was deployed using Dokku. But Coolify, Portainer or +just docker-compose are also good options. + +# Noteworthy URLs + +Lucide icons: https://lucide.dev/icons + +Icons module: https://github.com/Rails-Designer/rails_icons + +Zurb foundation SCSS variables: https://get.foundation/sites/docs + diff --git a/doc/README.Installation on Dokku.md b/doc/README.Installation on Dokku.md index ddf1976..a5eab43 100644 --- a/doc/README.Installation on Dokku.md +++ b/doc/README.Installation on Dokku.md @@ -1,5 +1,7 @@ # Installing debshots on Dokku +(This document is not up to date.) + ## What is Dokku? [Dokku](https://dokku.com/) is an open-source software that helps deploy @@ -115,14 +117,6 @@ Create a new user record: ## Cron jobs -Parse Nginx access logs to count the number of visits of each package: - - RAILS_ENV=production bundle exec rake debshots:accesslog2visits[/var/log/nginx/cache-access.log.1] - -As a cron job: - - 41 9 * * * cd $HOME/debshots ; RAILS_ENV=production /home/debshots/.rbenv/shims/bundle exec rake debshots:accesslog2visits[/var/log/nginx/cache-access.log.1] - Get the latest information on packages from the Debian repositories. bundle exec rails debshots:update_from_deb_repos RAILS_ENV=production