This is and Elixir app that takes some keyword and searches to google and stores some important information.
-
Erlang 23.3
-
Elixir 1.11.4
-
Recommended version manager.
-
Poduction - https://search-extractor.herokuapp.com
-
Install Docker for Mac
-
Setup and boot the Docker containers:
make docker_setup
-
Install Elixir dependencies:
mix deps.get
-
Install Node dependencies:
npm install --prefix assets
-
Setup the databases:
mix ecto.setup
-
Start the Phoenix app
iex -S mix phx.server
-
Run all tests:
mix test
-
Run all lint:
mix codebase
-
Test coverage:
mix coverage
-
Build Docker image
docker-compose build
We are using heroku to deploy our staging
and production
app. There are few steps that needs to be followd to
deploy app successfully to Heroku -
-
Create two apps in heroku. One for
staging
and one forproduction
. -
Add below secrets to github -
Secrets Description HEROKU_API_KEY Can be found under Account settings HEROKU_STAGING_APP The heroku app name created for staging environment HEROKU_PRODUCTION_APP The heroku app name created for production environment -
Add a PostgreSql Database add-on to heroku app.
-
Add below environment variables to heroku app -
Environment Variable Description DATABASE_URL Will be added automatically after adding the database add-on to the Heroku app HOST_URL The URL host, e.g. acme.herokuapp.com
SECRET_KEY_BASE The value generated by running the command mix phx.gen.secret
-
Push to
development
branch will deploy tostaging
and push tomain
branch will deploy to production.