Skip to content

Instantly share code, notes, and snippets.

@lbehm
Created May 4, 2020 10:55
Show Gist options
  • Save lbehm/fbc35b18cf9f1f09d791f8275a48bc03 to your computer and use it in GitHub Desktop.
Save lbehm/fbc35b18cf9f1f09d791f8275a48bc03 to your computer and use it in GitHub Desktop.
systemd service unit file for Greenlight (BigBlueButton Frontend)
[Unit]
Description=Frontend for BigBlueButton conferencing system
After=network.target
[Install]
WantedBy=multi-user.target
[Service]
# Directory where greenlight is installed
WorkingDirectory=/opt/greenlight
# temp data / see below
CacheDirectory=greenlight
# Settings file from sample.env (https://github.com/bigbluebutton/greenlight/blob/master/sample.env)
EnvironmentFile=/etc/default/greenlight
Environment="RAILS_ENV=production"
Environment="PORT=8000"
# only writable Location: CacheDirectory - for temporary data (i.e. bundle startup)
Environment="HOME=/var/cache/greenlight"
Type=exec
ExecStartPre=bundle exec rake db:migrate
ExecStart=bundle exec puma -C config/puma.rb
TimeoutSec=15
Restart=always
# Prevent writes to /usr, /boot, and /etc
DynamicUser=yes
ProtectSystem=strict
NoNewPrivileges=true
ProtectHome=true
@lbehm
Copy link
Author

lbehm commented May 4, 2020

Maybe you want to set the After to postgresql.service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment