<commit_before>[![Build Status](https://travis-ci.org/digitalnatives/course_planner.svg?branch=master)](https://travis-ci.org/digitalnatives/course_planner)
[![codebeat badge](https://codebeat.co/badges/ddc1feb0-d6a0-451f-b77d-1196254ac024)](https://codebeat.co/projects/github-com-digitalnatives-course_planner-master)
[![Coverage Status](https://coveralls.io/repos/github/digitalnatives/course_planner/badge.svg?branch=master)](https://coveralls.io/github/digitalnatives/course_planner?branch=master)

# Course Planner

## Development Setup

### Local

  * Install dependencies with `mix deps.get`
  * Create and migrate your database with `mix ecto.create && mix ecto.migrate`
  * Install Node.js dependencies with `cd assets; npm install; cd ..`
  * Start Phoenix endpoint with `iex -S mix phx.server`

Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.

## Production Setup

### Heroku

First, be sure `MIX_ENV` is set to `heroku` during compilation

    heroku config:set MIX_ENV=heroku

Then, click the button!

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

### Gigalixir

For more details, see [the quick start](http://gigalixir.readthedocs.io/en/latest/main.html#getting-started-guide)

   1. `pip install gigalixir`
   2. `gigalixir login`
   3. `APP_NAME=$(gigalixir create --name course-planner)`
   4. `gigalixig set_config $APP_NAME DATABASE_URL $YOUR_DB_URL`
   5. `git push gigalixir master`
   6. `gigalixir migrate $APP_NAME`

<commit_msg>Update README.md with gigalixir workarounds<commit_after>[![Build Status](https://travis-ci.org/digitalnatives/course_planner.svg?branch=master)](https://travis-ci.org/digitalnatives/course_planner)
[![codebeat badge](https://codebeat.co/badges/ddc1feb0-d6a0-451f-b77d-1196254ac024)](https://codebeat.co/projects/github-com-digitalnatives-course_planner-master)
[![Coverage Status](https://coveralls.io/repos/github/digitalnatives/course_planner/badge.svg?branch=master)](https://coveralls.io/github/digitalnatives/course_planner?branch=master)

# Course Planner

## Development Setup

### Local

  * Install dependencies with `mix deps.get`
  * Create and migrate your database with `mix ecto.create && mix ecto.migrate`
  * Install Node.js dependencies with `cd assets; npm install; cd ..`
  * Start Phoenix endpoint with `iex -S mix phx.server`

Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.

## Production Setup

### Heroku

First, be sure `MIX_ENV` is set to `heroku` during compilation

    heroku config:set MIX_ENV=heroku

Then, click the button!

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

### Gigalixir

For more details, see [the quick start](http://gigalixir.readthedocs.io/en/latest/main.html#getting-started-guide)

   1. `pip install gigalixir`
   2. `gigalixir login`
   3. `APP_NAME=$(gigalixir create --name course-planner)`
   4. `gigalixig set_config $APP_NAME DATABASE_URL $YOUR_DB_URL`
      
      If you don't have a database, you can create one by running `gigalixir create_database $APP_NAME` and waiting for it to become `AVAILABLE`.
   5. `git push gigalixir master`
   
   6. `MIX_ENV=prod mix release --env=prod`
      `MIX_ENV=prod DATABASE_URL="$YOUR_DB_URL" mix ecto.migrate`

      `$YOUR_DB_URL` is in the format: `ecto://user:pass@host:port/db` and you can find those parameters by running `gigalixir databases $APP_NAME`

      This workaround is necessary because the app won't start without running the migrations.
   
   7. Connect to the consoel with `gigalixir remote_console $APP_NAME` and manually run the seeds.
{'fraction_non_alphanumeric': 0.12886456908344734, 'fraction_numerical': 0.018331053351573187, 'mean_word_length': 4.793977812995245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '581455', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1248, 'n_words': 289}