ARM64 dev support (#1863)

* chore(docker): improve repeat contributions workflow

* This change adds two new commands to gracefully stop and remove the Postgres and Clickhouse docker containers. To do so, it also gives them a recognizable name.

* Additionally, the Postgres container is updated to use a named volume for its data. This lower friction for repeat contributions where one would otherwise sign up and activate their accounts again and again each time.

* Apple M1 compatibility for local development

* Patch upgrade for Python to a version that is built without errors
* Use a new community image for clickhouse that's ARM64 compatible
* Update contribution docs
This commit is contained in:
Ru 2022-04-28 00:22:12 +05:30 committed by GitHub
parent a64cc84db2
commit 7505584cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
elixir 1.12.2-otp-24
erlang 24.0.3
nodejs 16.3.0
python 3.9.4
python 3.9.12

View File

@ -9,6 +9,7 @@ Make sure Docker, Elixir, Erlang and Node.js are all installed on your developme
### Start the environment:
1. Run both `make postgres` and `make clickhouse`.
1. If you are using Apple Silicon (any of the M1 or similar SoC variants), `make clickhouse-arm` offers a development-only substitute that will work on your local machine. Not intended for production.
2. You can set up everything with `make install`, alternatively run each command separately:
1. 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.

View File

@ -10,6 +10,9 @@ server:
clickhouse:
docker run --detach -p 8123:8123 --ulimit nofile=262144:262144 --volume=$$PWD/.clickhouse_db_vol:/var/lib/clickhouse --name plausible_clickhouse yandex/clickhouse-server:21.3.2.5
clickhouse-arm:
docker run --detach -p 8123:8123 --ulimit nofile=262144:262144 --volume=$$PWD/.clickhouse_db_vol:/var/lib/clickhouse --name plausible_clickhouse altinity/clickhouse-server:21.12.3.32.altinitydev.arm
clickhouse-stop:
docker stop plausible_clickhouse && docker rm plausible_clickhouse