|Max Erenberg 8d29e7ae23
Creating the database
On coffee, login as the
postgres user, run
psql, then run the following:
CREATE USER greenlight WITH PASSWORD 'replace_this_password';
CREATE DATABASE greenlight;
ALTER DATABASE greenlight OWNER TO greenlight;
Running the playbook
Just the usual:
Once the playbook has finished, open
/opt/greenlight/.env and set the
Also, place copies of
(the wildcard CSC SSL certificate and key, respectively) in the directory
/etc/nginx/ssl. The key file must have permissions 0600.
Then, restart BBB:
Running as the greenlight user
Add the following lines to
export $(grep -v '^#' ~/.env)
This will allow you to use the
bundle command after running
su - greenlight, if you need to do so.
Enable and run the systemd service:
systemctl enable greenlight
systemctl start greenlight
Creating an administrator account
Theoretically, there is a bundle command which should be able to create an administrator account. However, when I did this, I found that I was unable to login using the new admin credentials. Might be because of LDAP. Here's my workaround:
- Login once using your CSC credentials.
- Log out.
- On coffee, login as
psql, and run the following:
UPDATE users SET role_id = 2 WHERE username = 'my_csc_username';
When you log back in, you should now be an admin.
To ensure that future sysadmins automatically become Greenlight admins, create a new role called "sysadmin" from the org settings in Greenlight.
To set a custom logo in the top left corner, go to 'Site Settings', and replace the branding image URL. I'm using a small CSC logo hosted on our git server in the csc-propaganda repo.