Here lies Lightbox
We are moving over to Docker but still with a sprinkling of VirtualBox. Docker will allow us to easily define the server requirements of each project alongside the code and VirtualBox is enabling us to do this without any major performance loss.
Docker Toolbox - Its basically all the things you need (Dockerwize)!
N.B. Get the most recent non pre-release!
Homebrew is "The missing package manager for macOS", pretty much it lets you easily install packages similar to apt-get
on linux.
Run the following command to install it:
[ ! -f "
which brew" ] && /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Clone this repository somewhere:
git clone https://github.com/wearelighthouse/lightship.git
Then from within the created directory run:
make install
Once this is installed you can start using Docker as your dev environment.
If a project has a docker-compose.yml
file it means its ready to be used with Docker, start the site by running:
docker-compose up -d
Then when you're finished working on that site don't forget to run:
docker-compose down
We will include a Makefile
with each project so check the README.md
for more information on running that site with Docker.
- One at a time: You can only have one project up at one time - Docker exposes port 80 from the
nginx
container to VirtualBox, only one thing can be on a port at one time. - IP: The VirtualBox's IP is
192.168.99.100
, this is where you will see your site - You can double check this by runningdocker-machine ip
in your terminal - You can use this IP as the proxy when using Browsersync. - Folder names and hypens: You can't run docker from within a folder with a hyphen - go ahead and remove it!
- The installation should have installed a LaunchAgent to make sure the VirtualBox is started on startup. You can check it is running by running
docker-machine ls
in your terminal and looking for a machine calleddefault
. If it isn't running simply rundocker-machine start
Here is a list of "starting" points to dockerize various types of projects.