To run this project, you will need to install the following dependencies on your system:
Dependencie | Version |
---|---|
Elixir | 1.8.1 |
Phoenix | 1.4.0 |
PostgreSQL | 10.6 |
To get started, run the following commands in your project folder:
sudo apt-get install postgis # install postgis
mix deps.get # installs the dependencies
mix ecto.setup # creates the database and run migrations
iex -S mix phx.server # run the application
Now you can visit localhost:4000
from your browser.
Before execute this commands make sure that Docker and docker-compose are installed and running.
docker-compose build && docker-compose up
To execute the test suits locally:
mix test
You can use the content of api.yml to see the docs on Swagger Editor.
After clone this project to the server and define the environment variables(SECRET, PGUSER,PGPASSWORD,PGDATABASE), run the following commands:
cp ./config/prod.secret.exs.sample ./config/prod.secret.exs
mix deps.get --only prod
MIX_ENV=prod elixir --detached -S mix do compile, phx.server