slight corrections
This commit is contained in:
parent
8e35e9300e
commit
98af99de9f
2 changed files with 29 additions and 18 deletions
|
|
@ -3,20 +3,13 @@
|
||||||
This document helps you set up the *debshots* Rails application on your
|
This document helps you set up the *debshots* Rails application on your
|
||||||
own Debian system if you intend to work on the source code.
|
own Debian system if you intend to work on the source code.
|
||||||
|
|
||||||
## Preparing the development environment
|
# 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.
|
|
||||||
|
|
||||||
## Install dependencies
|
## 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
|
zlib1g-dev libbz2-dev libpq-dev git imagemagick
|
||||||
|
|
||||||
## Prepare PostgreSQL database server and user
|
## 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.
|
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
|
## Optional: Tidy up the screenshot data
|
||||||
|
|
||||||
bundle exec rake debshots:remove_broken_screenshots
|
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'
|
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.
|
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
# Installing debshots on Dokku
|
# Installing debshots on Dokku
|
||||||
|
|
||||||
|
(This document is not up to date.)
|
||||||
|
|
||||||
## What is Dokku?
|
## What is Dokku?
|
||||||
|
|
||||||
[Dokku](https://dokku.com/) is an open-source software that helps deploy
|
[Dokku](https://dokku.com/) is an open-source software that helps deploy
|
||||||
|
|
@ -115,14 +117,6 @@ Create a new user record:
|
||||||
|
|
||||||
## Cron jobs
|
## 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.
|
Get the latest information on packages from the Debian repositories.
|
||||||
|
|
||||||
bundle exec rails debshots:update_from_deb_repos RAILS_ENV=production
|
bundle exec rails debshots:update_from_deb_repos RAILS_ENV=production
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue