Skip to content

Installation Instructions

David Upton edited this page Aug 22, 2018 · 17 revisions

Creates a drupal 8 container, mysql container and node container, and connects them all up.

Quick Install Guide

For more detailed install and usage instructions for various platforms, see "More Help" below.

  1. Ensure you have docker installed on your host computer (Docker Installation).
  2. Ensure you have Lando installed on your host computer (lando git repo and Lando Install Instructions)
  3. Clone this repo into a local folder
    git clone -b <branchname> git@github.com:CityOfBoston/boston.gov-d8.git
    ( City of Boston DoIT recommends that the "develop" branch be used)
  4. On host computer, change directory to the repo root and run lando to create and start containers:
    lando start
  5. From repo root (on host) -view lando commands lando
  6. From repo root (on host) -view phing tasks lando phing -l
  7. From repo root (on host) -run drush commands lando drush <command>
  8. From repo root (on host) -ssh into container
  • lando ssh to ssh and login as www-data
  • lando ssh -user=root to ssh and login as root.
  • lando ssh <servicename> servicename = appserver / database / node

Pro-Tips

Linux Aliases

To reduce typing at the console, you can add the following aliases to your ~/bashrc, ~/.bash_aliases or ~/.bash_profile files on your development (host) OS.

alias ldrush='lando drush'
alias lssh='lando ssh'
alias lsshroot='lando ssh --user=root'
alias lphing='lando phing'
alias lcomposer='lando composer'
alias lnpm='lando npm'
alias ldrupal='lando drupal'
function lls() {
lando ssh -c "ls -la $1"
}

With these aliases, typing (in a console) lls <folder> will use lando to run ls -la <folder> in the default container (in our case appserver) and list files there. Whereas, ls <folder> will list the folder locally (i.e. on the host) as usual.

Suggested build script

You can build a script like this and use it to destroy and re-create your development environment at any time.

cd <path to repo-root folder>
lando destroy -y
cd <path to folder containing repo-root>
sudo rm -rf ./boston.gov-d8/
git clone -b develop git@github.com:CityOfBoston/boston.gov-d8.git boston.gov-d8
cd <path to repo-root folder>
lando start

More Help

For more information on installation, usage and administration of the development area, select your operating system below: