Pupilfirst (https://www.pupilfirst.com/) is a Free Software Learning Management system written in Ruby on Rails. Currently they only support deploying to heroku. This page will be used to keep track of packaging pupilfirst for Debian.
Work in progress package repo: https://people.debian.org/~praveen/pupilfirst/
Work in progress source package: https://salsa.debian.org/ruby-team/pupilfirst
Add personal repo of pupilfirst maintainer following https://people.debian.org/~praveen/pupilfirst/README
$ sudo apt install ruby-rails/experimental ruby-actioncable/experimental \ ruby-actionmailbox/experimental ruby-actionmailer/experimental \ ruby-actionpack/experimental ruby-actiontext/experimental \ ruby-actionview/experimental ruby-activejob/experimental ruby-activemodel/experimental \ ruby-activerecord/experimental ruby-activestorage/experimental \ ruby-activesupport/experimental ruby-railties/experimental \ ruby-tzinfo/experimental pupilfirst
Visit http://<your fqdn> on your browser to see the default page.
Start rails console,
$ set -a && . /etc/pupilfirst/pupilfirst.env && set +a $ cd /usr/share/pupilfirst/ $ sudo -u pupilfirst -EH bundle exec rails console
If you don'tuse sudo, use su pupilfirst -s /bin/sh -c 'bundle exec rails console'
and follow upstream documentation to configure your instance
Configure recaptcha keys - add these (or any other variable you like to set) to /etc/pupilfirst/pupilfirst.env
Upstream meta issue for tracking issues that need help from upstream - https://github.com/pupilfirst/pupilfirst/issues/797
Need help - make recaptcha optional https://github.com/pupilfirst/pupilfirst/issues/822
- Basic package template - done
- Install rubygems dependencies (pull only unpackaged gems from rubygems.org) - done
- Configure database - done (need to provide a working config/database.yml)
- Run database migrations - done
- Install node dependencies - done
- Precompile assets (includes webpacker) - done (needed to copy source tree to /var as symlinking some directories don't work)
- Start rails app - done (use local storage over amazon s3, create tmpfiles.d config for pids and sockets, need to disable https)
- Configure puma - done
- Configure systemd units - done
- Configure nginx - done
- Properly generate keys and remove hard coding - done (vapid keys and secret_key_base are now generated during installation)
- Setup debconf for choosing hostname - done (hostname is handled via debconf now)
- Remove hard coding of GEM_PATH (for other archs) - done
In progress or not started tasks
- Set admin password and add school - in progress (done manually, need upstream help to enable login via username/disable recaptcha)
- Use runuser instead of su in scripts - not started
- Switch nginx to use unix socket - not started
- Setup debconf for choosing https/lets encrypt - not started
Testing the package
You can setup lxc, system nspawn or a virtual machine to install the package. Use /etc/hosts file of the host machine to map the container or virtual machine ip to a hostname and use this hostname for the pupilfirst service. You can visit the service using a browser on the host machine.