Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 3.24 KB

INSTALL_SNAPCON.md

File metadata and controls

57 lines (39 loc) · 3.24 KB

Install Snap!Con

Snap!Con runs Ruby 2.7.6 with Rails 5.2. The backend is provided by PostgreSQL. It is recommended to use RVM to manage the gems for this project. Some JavaScript dependencies are used, which need to be installed via NPM or Yarn.

Setup

The recommended setup steps are as follows:

  1. Run npm install or yarn to install the necessary JavaScript dependencies.
  2. Run bundle config set without production to ensure only developmental gems are installed.
  3. Run bundle config set path vendor/bundle to install gems to vendor/bundle.
  4. Run bundle install to install the necessary gems.
  5. Configure your environment variables.
    1. Run cp dotenv.example .env
    2. At a bare minimum, you will likely need to provide credentials with which to access your PostgreSQL database. An example might be as follows:
      OSEM_DB_USER= esobeck #this can be computer's username
      OSEM_DB_PASSWORD= password123 #likely not necessary if using postgress with computer's username
      
    3. Other features will require more environment variables. See Environment Variables and INSTALL.md#configuration for all the environment variables that may be set.
  6. Run rake db:setup (this command and all following commands may need to prefixed with bundle exec) to initialize the database.

Setting Environment Variables for macOS

For developers using macOS, it's necessary to set an environment variable to prevent issues related to forking processes. Before starting the application, please set OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES by following these steps:

For Temporary Use in the Current Terminal Session

Execute the following command in your terminal:

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

This will set the environment variable for the duration of your current terminal session. You'll need to run this command each time you open a new terminal window.

Local Deployment

To run Snap!Con, using Overmind or Foreman is recommended. Since a release command is run which automatically performs migrations, it is necessary to flag the release command as able to be exited without closing all other processes. The Rails server may be run via the typical rails server command, but do note that no jobs will be run.

Heroku Deployment

TODO: Update this section...

When deploying to Heroku, the heroku/nodejs buildpack must be run before the heroku/ruby buildpack. Since Snap!Con runs on PostgreSQL, the Postgres add-on must also be added to the Heroku deployment.

Heroku Stack: heroku-22

Example Data

Example data can easily be generated by running rake data:demo. Please note that this command can fail if the database is not fresh.

Environment Variables

In addition to the environment variables detailed under INSTALL.md#configuration, the following environment variables may be configured.

MAILBLUSTER_API_KEY

A generated API key necessary to utilize the Mailbluster integration.

FULL_CALENDAR_LICENSE_KEY=GPL-My-Project-Is-Open-Source

If utilizing the FullCalendar display module, necessary to disable the license key warning.