Lessonly Local Dev Config
This project is intended for the purposes of making it easy to share and maintain development environtment configuration for lessonly developers.
When you receive your Lessonly MacBook, start here before setting up other tools.
Getting Started
MacOS
- Open a Terminal window and run
git
. This will prompt you to install Xcode tools. Install it. - Open a browser window to https://github.com and log in to Github.
- Download and install Docker for Mac.
- Once you have it installed, run and log in to the Docker app. You may need to sign up if you haven't done this before.
- In your Terminal window, change to the directory where you want git repositories to go, and clone this repo.
git clone https://github.com/lessonly/lldevconfig.git cd lldevconfig
- Run the bootstrap script
bin/bootstrap
- This will require user input a few times, including:
- Enter your computer password to install Homebrew
- Enter your computer password to install local root cert for Caddy
- Enter your computer password to change your default shell
- Enter the email address you use in Github to create your SSH key
- Enter a password to protect your SSH key (you will be asked 3 times)
- Add your SSH key in Github. It should copy the key and open a page to the Github SSH keys page for you to make it easy.
- Once this script completes, you should close this window and open a new terminal so that it loads zsh.
At this point, you have everything you need to clone a project and follow its setup instructions. We recommend visiting https://github.com/lessonly/lessonly#getting-started and following the setup instructions there, first. That's our core app and most likely where you'll be spending more of your time.
Other operating systems
We don't officially support other operating systems right now.
How It works
This is script sets up 3 things:
- port forwarding of 80 & 443 over to non-standard ports
- dnsmasq to handle
*.lessonly.test
domains - caddy to handle certificates and reverse proxy to local lessonly
What is currently included
Caddy Dev Frontend
- This script will start up a caddy instance that will serve as a reverse proxy to a rails backend on port 3000
zsh
This script sets up zsh as your default shell. We recommend also installing oh-my-zsh, which makes your shell much more useful.
asdf
asdf is a dependency version manager. It uses our .tool-versions
files to determine what version of Ruby, NodeJS, Yarn, and other tools each project needs. It ensures the right versions are installed and used in the context of those projects.
Homebrew
Homebrew is a dependency manager which acts on a system level (whereas asdf works primarily on a project level).