Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: mac init scripts #10

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ Step one is always to fork this repo!

Prismatopia is a reference implementation, meaning you can clone it, configure, run it and play with it. You make a copy of this repository and that copy becomes the backend for your application. You'll end up customizing your copy of this repository with your resolvers, schemas and other stuff. This repository is simply an empty vessel for you to fork or otherwise copy as the starting point for your API stack.

#### MacOS:

Install docker & docker-compose:
```
cd ~/prismatopia && ./macos.sh
```

## The Stack

This API is built as a very specific stack of technologies.bThere no options, other than configuring the existing stack components or swapping them out in your own copy. Enjoy!
Expand Down Expand Up @@ -74,7 +81,7 @@ Directories:
* [The Apollo Layer](apollo/README.md)
* [The Prisma Layer](prisma/README.md)
* [The AWS Layer](cloudformation/README.md)

## Running locally

TODO: Fix lazy loading of AWS variables
Expand Down
34 changes: 34 additions & 0 deletions macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

setup_homebrew() {
if [[ ! $(which brew) ]] && [[ ! $(brew --version &> /dev/null) ]]; then
echo -e "\nCould not find existing HOMEBREW installation."
echo -e "\nNow installing..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
}

install_packages() {
echo -e "\nInstalling Docker for MacOS..."

declare -a packages=(
"docker"
"docker-compose"
)

brew install ${packages[@]}
brew cask install docker

echo -e "DONE.\n"
}

setup_macos() {
echo -e "\nSetting up MacOS config...\n"

setup_homebrew
install_packages

echo -e "DONE.\n"
}

setup_macos