UNL reservation system for schedule resources, classes, etc.
- Service spaces refer to different silos of the University that will utilize resources. E.g. the math department, the Honors program, or University Communication.
- Super Admins of a space can do anything, including giving others access and privileges to the space.
- Resources are created, and then may be reserved by anyone who has the User Access privilege in the space.
- Events may include a resource reservation but do not have to.
- Admins with the right privilege can set the hours of the space, which indicate when reservations can be made.
- The agenda is a quick overview of the day for Admins to look at.
- Run
xcode-select --install
. Congratulations, you have saved yourself 5000 insanity points. - Get the right ruby on your machine. UNL Resource Scheduler currently runs on Ruby 2.6.10. Get RVM on your machine with
\curl -sSL https://get.rvm.io | bash
. - Now using RVM, install the ruby with
rvm install 2.6.10
. - You probably do not have the
bundler
gem. Check withbundle
. If not, install it withgem install bundler
. - In the project root, install the gems using
bundle install
. - Create a mysql database you'd like to use, you can typically use one on your computer.
brew install mysql
if necessary. config/config.json
is a committed file, and a template for the configuration. Create a copy in the same directory namedserver.json
and edit it to match your database. You will also need to include your site keys for google reCaptcha which can be generated at https://www.google.com/recaptcha/ for the V2 checkbox.- Your database is currently blank. Install database schema by running
./data/db_2024_11_08.sql
and any updates greater than0006
. - Install the WDN Framework into the
public/wdn
directory...see WDN Documentation. - Start the server by going to the root directory and doing
bundle exec shotgun -o 0.0.0.0 -p 9393
. This launches the server on localhost port 9393, listening everywhere (you can use your iimlemburg.unl.edu or whichever), and the server will automatically update to new code. If you add gems to the bundle, you will need to re-execute this command. - Navigate to
localhost:9393/
or similar and begin!
I couldn't get Guard to work for me locally so I also added a npm version of less complication
The traditional way to compile less bundle exec guard
The NPM way to compile less
- Run
npm ci
to install less - Run
npm run less
to compile less
A quick way to test emails without having to set up email stuff is to run a SMTP debug server in python
sudo python -m smtpd -n -c DebuggingServer localhost:25
- Run
sudo -u {user} -s
run commands as a user and navigate to your project's root - Run
cp ./config/config.json ./config/server.json
to copy config file and customize it to your environment - Run
ln -s {path to WDN Templates} {path to project root}/public/wdn
to symlink WDN Templates to your project - Run
/bin/bundler install
to install dependencies- You might need to run
/bin/bundle config set --local path 'vendor/bundle'
- You might need to run
- Install database schema by running
./data/db_2024_11_08.sql
and any updates greater than0008
- You will need to get a service running for unicorn using systemd
- Run
cp ./startup.sh.sample ./startup.sh
and customize file for your domain and sock - Run
cp ./unicorn.rb.sample ./unicorn.rb
and customize file for your domain and sock - Run
mkdir -p ~/.config/systemd/user
to set up systemd user directory - Run
cp ./unicorn.service.sample ~/.config/systemd/user/unicorn.service
and customize file for your domain and sock
- Run
- Run
systemctl --user start unicorn
to start the service - Run
systemctl --user enable unicorn
to start the service on boot
- SSH into server and switch to site's user
sudo -u {USER} -s
- Run
git pull origin master
to pull latest changes - Update database using SQL files in
./data/updates
- Update any gems using
bundle install
- Restart unicorn
systemctl --user restart unicorn
- Double check service is running
systemctl --user status unicorn
- Check for errors
journalctl --user -u unicorn -f
- Starting unicorn
systemctl --user start unicorn
- Stopping unicorn
systemctl --user stop unicorn
- Start unicorn on boot
systemctl --user enable unicorn
- Don't start unicorn on boot
systemctl --user disable unicorn
- Check if unicorn is enabled
systemctl --user is-enabled unicorn
- Update systemctl when changes made to service file
systemctl --user daemon-reload
0 12 * * * ruby ././scripts/email_expiring_users.rb
0 12 * * * ruby ././scripts/email_unconfirmed_trainers.rb
0 22 * * * ruby ././scripts/email_expiring_users_vehicle_update.rb