- Install Docker for Mac
- Goto a directory where you want to keep code. I keep mine in
~/Projects
.cd ~
- This moves your terminal to your home directory.mkdir Projects
- This creates the dir~/Projects
.cd Projects
- This moves you into the newProjects
dir.
- Git clone this repository to your computer.
git clone git@github.com:arich/dev_school.git
cd dev_school
- This moves you into the newdev_school
dir.docker-compose up
- This starts the rails web server and database locally.docker-compose run --rm web bundle exec rake db:create
- This creates your local database within the docker container.- In a browser like Chrome, go to
http://localhost:3001/
. You should see a message that says "Yay! You're on Rails!"
The above steps should only need to be run once. To pick up where you left off last time:
cd Projects/dev_school
docker-compose up