Skip to content

carrot-u/carrot-u-admin-app

Repository files navigation

Carrot U Admin

This is the final project for the 2019-2020 Carrot U session. It will manage students, mentors, and sessions of the course.

Setup instructions

Clone the GitHub repo

This pulls the source code for the app to your laptop.

% cd                # go to your home directory
% mkdir git         # create a directory for git (if needed)
% cd git            # go into the git directory
% git clone https://github.com/carrot-u/carrot-u-admin-app/  # check this repo out from git

Run the bundler

This pulls all the gems (shared libraries) needed by the app to your machine.

% cd carrot-u-admin-app       # go into the source directory
% bundle install

You may get some error messages about the version of bundler, needing to update yarn, etc. These should give you instructions about what needs to be done to fix the errors, just follow those and ask in the #carrot-university channel if you can't resolve the problem.

Set up Postgres

You should have already installed Postgres during the setup for the course, but you need to create the database for the project.

Create the database:

% createdb carrot_u_admin      # run the postgres command to create the db

Run the migrations:

% rake db:migrate

Configure Okta

There is an Okta certificate that you can use locally pinned in the #carrot-university channel. Create a /conf directory in your repo and add this certificate into that directory. For example, if you have downloaded to your Downloads directory:

% mkdir conf      # create the conf directory in ~/git/carrot-u-admin-app
% cd conf         # go into the conf directory
% cp ~/Downloads/okta.cert .   # copy the downloaded cert into this directory
% cd ..           # move back to the main source code directory

Configure Heroku

Heroku is the cloud platform we will be running the app on. You can deploy to it using git, with some setup work. Detailed instructions are here.

Simple instructions below.

Install Heroku command line (CLI) with brew:

% brew tap heroku/brew && brew install heroku

Connect to the Heroku app:

% heroku git:remote -a carrot-u-admin      # this tells git where your heroku app lives

For setup this is all you need to do, but now you can push code to Heroku, run db migrations, and launch the app. See the Heroku docs to learn more about using Heroku.

Running your app

Local

You can run locally using rails:

% rails s

This allows you to access your local version of the app at http://locahost:3000/

Use this when developing code.

Heroku

You can launch the Heroku app using the Heroku command line:

% heroku apps:open     # this will open the app URL in your default browser

or you can just browse to https://carrot-u-admin.herokuapp.com/

Use this to see what the current master branch of the code looks like.

Okta

Note that we are connecting to this app using Okta, so the version running on Heroku will also appear on your Okta home page - look for "Carrot U".

About

2019-2020 session class project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors