From 3ff2c79b338056426fd6938200e3176cf200b849 Mon Sep 17 00:00:00 2001 From: Johan Fagerberg Date: Tue, 10 Nov 2020 09:58:49 +0100 Subject: [PATCH] Update contribution guidelines (#403) * Update contribution guidelines to include dependency installation Now mentions the required system dependencies, and the step for installing Elixir deps Erlang is used by the :gettext dependency, and ecto.create will fail if it is not present * Make Clickhouse and PostgreSQL containers run in detached mode This ensures that they run in the background so that they are present during the follow steps --- CONTRIBUTING.md | 3 +++ Makefile | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d673b53a3..3f96b4fd6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,9 +4,12 @@ The easiest way to get up and running is to [install](https://docs.docker.com/get-docker/) and use Docker for running both Postgres and Clickhouse. +Make sure Docker, Elixir, Erlang and Node.js are all installed on your development machine. + ### Start the environment: 1. Run both `make postgres` and `make clickhouse`. +2. Run `mix deps.get`. This will download the required Elixir dependencies. 2. Run `mix ecto.create`. This will create the required databases in both Postgres and Clickhouse. 3. Run `mix ecto.migrate` to build the database schema. 4. Run `npm ci --prefix assets` to install the required node dependencies. diff --git a/Makefile b/Makefile index 49c4805d2..5e95ac814 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ clickhouse: - docker run -p 8123:8123 --ulimit nofile=262144:262144 --volume=$$HOME/clickhouse_db_vol:/var/lib/clickhouse yandex/clickhouse-server + docker run --detach -p 8123:8123 --ulimit nofile=262144:262144 --volume=$$HOME/clickhouse_db_vol:/var/lib/clickhouse yandex/clickhouse-server postgres: - docker run -e POSTGRES_PASSWORD="postgres" -p 5432:5432 postgres + docker run --detach -e POSTGRES_PASSWORD="postgres" -p 5432:5432 postgres dummy_event: curl 'http://localhost:8000/api/event' \