- Live - http://live-fix-me.pantheonsite.io/
- Test - http://test-fix-me.pantheonsite.io/
- Dev - http://dev-fix-me.pantheonsite.io/
In order to more easily recreate the production environment locally, Lando is used for local development. We also use Pantheon’s CLI, Terminus, to sync files and databases.
- PHP Server - http://fix-me.lndo.site/
- Webpack Server - https://localhost:3000
Install all the required local dependencies:
- Git Version Control
- Docker
- Lando v3.0.6 (Windows, macOS)
- Terminus 2.3.0, Pantheon’s CLI tool
- Composer
- Node 10.21.0 Note: The sage theme dependencies do not support version of Node greater than 10. We recommend asdf for managing multiple versions of Node
- Yarn (Windows, macOS)
You'll also need write access to this repo and be a member of the Pantheon Project.
- Clone the Repo
$ git clone https://github.com/Threespot/fix-me.git
- Install Application Composer Dependencies
$ composer install
- Install Theme Composer Dependencies
- Navigate to the sage theme directory
$ cd web/wp-content/themes/sage
- Install Componser deps
$ composer install
- Navigate to the sage theme directory
- Install Theme Node Dependencies
- Navigate to the sage theme directory
$ cd web/wp-content/themes/sage
- Install Node deps
$ yarn install
from the theme directory
- Navigate to the sage theme directory
With all the dependencies installed, from the root project directory run:
lando start
If this is the first time running this command, Lando will build the necessary Docker containers.
To stop the server run:
lando stop
Other Lando CLI command can be read here in the Lando docs
Making CSS or JS updates requires running Webpack to recompile and inject the CSS and JS.
-
Navigate to the theme folder
$ cd /web/wp-content/themes/sage
-
Install npm dependencies using Yarn
$ yarn install
-
Start Webpack
$ yarn start
-
You should now be able to view the site locally at https://localhost:3000
-
To stop the server, press Control + C
Lando is used to pull uploads and data from Pantheon. See docs here.
lando pull --database=test --files=test --code=none
Code committed to the remote master
branch is automatically deployed to the dev
environement on Pantheon. After a local branch is pushed, CircleCI will build and deploy the files to Pantheon’s dev environment. You can tell CircleCI to not run by adding [skip ci]
to the commit message.
Code that exists on dev
can be promoted to the test
enviroment, and test
can be promoted to the live
environment. Details about the application lifecycle can be read here.
Feature branches with a corresponding pull request will create a multi-dev enviroment used for testing indiviual features. Docs are available here
Code will be promoted from dev
to test
lando composer run-script deploy:test
NOTE: this composer script will also purge Pantheon's cache.
or
lando terminus env:deploy fix-me.test
Code will be promoted from test
to live
lando composer run-script deploy:live
or
lando terminus env:deploy fix-me.live