Skip to content

0xCAB0/Betunfair

Repository files navigation

BetUnfair

BetUnfair is a marketplace where users can place bets against each other,rather than against a bookmaker

Table of Contents

Documentation

At docs folder you can checkout information about the database:

Development Setup

Prerequesites

If you are confortable with using docker, you can run a development enviroment with this requesites with our Docker Image, which contains:

  1. Elixir ^1.12
  2. OTP ^24
  3. MariaDB / MySQL server running
  4. MariaDB / MySQL client

Database set-up and connection

You can use the scrip autobuildDB to rebuild the databases on migration update or creation. Atention: this script will erase the previous databases betunfair and betunfair_test

sudo ./utils/autobuildDB.sh

Or you can do it manually

  1. Create the databases by running utils/init.sql as root

  2. Run the migrations for the testing db

    MIX_ENV=dev mix ecto.migrate -r BetUnfair.Repo
    MIX_ENV=test mix ecto.migrate -r BetUnfair.Repo
  3. You can test the connection by running:

     iex> MyApp.Repo.start_link()
     {:ok, #PID<0.198.0>}

Useful links