https://github.com/ucfopen/obojobo-deploy
A reference setup on how to deploy and customize an Obojobo Next Server
https://github.com/ucfopen/obojobo-deploy
Last synced: 12 months ago
JSON representation
A reference setup on how to deploy and customize an Obojobo Next Server
- Host: GitHub
- URL: https://github.com/ucfopen/obojobo-deploy
- Owner: ucfopen
- License: agpl-3.0
- Created: 2019-07-15T23:53:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T03:15:13.000Z (over 3 years ago)
- Last Synced: 2025-02-22T09:30:01.759Z (over 1 year ago)
- Language: JavaScript
- Size: 1.34 MB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Obojobo-Deploy
A reference setup for how to deploy and customize an Obojobo Next Server.
## Extending Express
Obojobo runs on [Express.js](https://expressjs.com). Using Express's [middleware](http://expressjs.com/en/guide/writing-middleware.html#writing-middleware-for-use-in-express-apps), you can extend Obojobo infinately by adding your own routes, api endpoints, and pages.
## Configuration
Obojobo follows The Twelve Factor App methodology pertaining to [environment variables for configuration](https://12factor.net/config). To take advantage of it, we'll include an example of loading configuration variables from AWS's Secrets Manager.
### ENV vars required to load secrets
* `AWS_SECRETS_REGION`
* `AWS_SECRETS_KEY`
### ENV vars required for application
Thes can be defined any number of ways, via `.env`, `/etc/environment`, export, or secrets manager.
* `NODE_ENV`
* `DEBUG`
* `DB_USER`
* `DB_PASS`
* `DB_HOST`
* `DB_NAME`
* `DB_PORT`
* `DB_SSL`
* `OBO_COOKIE_SECRET`
* `OBO_COOKIE_SECURE`
* `OBO_LTI_KEYS_JSON`
## Running a Production Server
[PM2](http://pm2.keymetrics.io/) is a process manager for Node. We'll use it here to run a production server and keep it fresh and fast.
```bash
# install npm modules
yarn install --production=true
# start the pm2 server
yarn start
# make sure pm2 starts on startup
yarn pm2 unstartup
yarn pm2 startup
# save the current pm2 processes
yarn pm2 save
```