Skip to content

Commit

Permalink
Improve docs w/r/t to prereqs that need to be installed (#40)
Browse files Browse the repository at this point in the history
* Improve docs w/r/t to prereqs that need to be installed

* Update README_starter.md

Co-authored-by: N. G. Scheurich <nick@scheurich.me>

Co-authored-by: N. G. Scheurich <nick@scheurich.me>
  • Loading branch information
lleger and ngscheurich authored Nov 11, 2020
1 parent a4fa849 commit 87b6d88
Showing 2 changed files with 25 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README_starter.md
Original file line number Diff line number Diff line change
@@ -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:
7 changes: 7 additions & 0 deletions bin/preflight.sh
Original file line number Diff line number Diff line change
@@ -26,13 +26,20 @@ 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

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

0 comments on commit 87b6d88

Please sign in to comment.