As of May 4th, 2021, erlang
is not available from macports for the ARM (Apple Silicon) platform.
Docker containers make it super easy to install postgresql and rabbitmq.
The M1 chips have great parallelism, so I'd hope to be able to run docker without noticing the overhead too much.
I could use conda
as well, but docker provides the neat docker-compose.yaml
that makes it possible to start up and shut down all the services required with a single command.
Switch from previous setup with rabbitmq and postgresql installed via macports
(could also be brew
, manual compilation, ...) to a setup with containerized services.
- Copy your postgresql database directory to a new directory
db
- Add the following lines to the
pg_hba.conf
file:
Note: If not on MacOS,# Note: the order is relevant! The first line that matches applies # TYPE DATABASE USER ADDRESS METHOD host all postgres host.docker.internal trust # give passwordless access to postgres user to your host host all all host.docker.internal md5 # password-protected access to all other users
host.docker.internal
may not work (you can just tryall
) docker-compose.yaml
version: '3.4'
services:
rabbit:
image: rabbitmq:3.8.3-management
container_name: aiida-rmq
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- '5672:5672'
- '15672:15672'
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 5
networks:
- aiida-rmq
postgresql:
image: postgres:9
container_name: aiida-postgres
ports:
- '5432:5432'
networks:
- aiida-rmq
volumes:
- ./db:/var/lib/postgresql/data
networks:
aiida-rmq:
docker-compose up -d
- Install psql binaries (if not yet present). Try
psql -h localhost -U postgres
(should work without password)