diff --git a/README_starter.md b/README_starter.md index 416f505c..67a5a34c 100644 --- a/README_starter.md +++ b/README_starter.md @@ -14,6 +14,24 @@ This will report which dependency, if any, still needs to be installed and confi If all dependencies are present, it'll run `asdf` to install language versions. +### Prerequisites + +If the preflight script reports any missing executables or you run into any other errors, here are the prerequisites for running the app. Check you have all of these installed. + +1. asdf, which manages package versions. We recommend [installing with the `git` method][asdf-install]. We also need plugins for the versions specified in `.tool-versions` (the preflight script will install these for you). +2. Docker Desktop (community edition). You can download the Mac version from [Docker Hub]. It's a self-contained install. +3. PostgreSQL, the database. This can be installed with [Homebrew][brew-pg]: `brew install postgresql`. Be sure to follow the post-installation notes to make sure PG is running: `brew info postgresql`. You can start it with `brew services start postgresql`. +4. A few dependencies for installing languages: + - `autoconf`: [required][erlang-req] to build Erlang; `brew install autoconf` + - `gnupg`: [required][node-req] to verify NodeJS; `brew install gnupg` + - For Erlang, it's recommended to skip the Java dependency on macOS. Run this or add to your shell: `export KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl)"`. + +[asdf-install]: https://asdf-vm.com/#/core-manage-asdf?id=install +[docker hub]: https://www.docker.com/products/docker-desktop +[brew-pg]: https://formulae.brew.sh/cask/postgres#default +[erlang-req]: https://github.com/asdf-vm/asdf-erlang#osx +[node-req]: https://github.com/asdf-vm/asdf-nodejs#install + ## Setup Once you've finished preflight setup, run the setup script: diff --git a/bin/preflight.sh b/bin/preflight.sh index 92e7b1c1..5536a72e 100755 --- a/bin/preflight.sh +++ b/bin/preflight.sh @@ -26,6 +26,8 @@ print_success() { print_step "Checking prerequisites" +check_executable autoconf # Erlang prereq +check_executable gpg # Node prereq check_executable asdf check_executable docker check_executable psql @@ -33,6 +35,11 @@ check_executable psql if [[ $check_failed = 0 ]]; then print_success "All prerequisites installed" + print_step "Installing asdf plugins..." + asdf plugin-add erlang + asdf plugin-add elixir + asdf plugin-add nodejs + print_step "Running asdf..." asdf install