- 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
from your browser.
- Deploy with the previous Heroku button. Make sure to setup the environment variable
ENDPOINT_URL_HOST
in the deploy page. For example, if the selectedApp name
iscourse-planner
, then theENDPOINT_URL_HOST
should becourse-planner.herokuapp.com
. - Create a SendGrid API Key and add it to the environment variable
SENDGRID_API_KEY
in the Heroku Settings tab.
For more details, see the Gigalixir quick start
- Clone this repository
git clone https://github.com/digitalnatives/course_planner.git
- Go to the project directory
cd course_planner
- Install gigalixir CLI (requires python 2.7)
pip install gigalixir
- Login with your Gigalixir account
gigalixir login
- Create the application
your-app-name
, which should be unique
APP_NAME=$(gigalixir create --name your-app-name)
- Create the database, and wait its state to become
AVAILABLE
.
gigalixir create_database $APP_NAME
gigalixir databases $APP_NAME
- Set the environment variables
gigalixir set_config $APP_NAME DATABASE_URL $YOUR_DB_URL
gigalixir set_config $APP_NAME SENDGRID_API_KEY $YOUR_SENDGRID_API_KEY
gigalixir set_config $APP_NAME EMAIL_FROM_NAME $EMAIL_FROM_NAME
gigalixir set_config $APP_NAME EMAIL_FROM_EMAIL $EMAIL_FROM_EMAIL
- Deploy the code
git push gigalixir master
- Run the data seed
gigalixir run $APP_NAME Elixir.CoursePlanner.ReleaseTasks seed