Skip to content

Threespot/example-wordpress-composer

 
 

Repository files navigation

fixme-project-name

Note: Badges are auto-generated when creating a new WP site on Pantheon via Terminus. You can copy the Markdown from CircleCI in Project Settings -> Status Badges.

Outline

Pantheon Environments

Local Development

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.

Prerequisites

Install all the required local dependencies:

You'll also need write access to this repo and be a member of the Pantheon Project.

Installation

  1. Clone the repo $ git clone https://github.com/Threespot/fixme-app-name.git
  2. Install application composer dependencies $ composer install
  3. Install theme dependencies
    • Navigate to the theme directory $ cd web/wp-content/themes/fixme-app-name
    • Install composer dependencies $ composer install
    • Install Node dependencies $ yarn install

Boot WordPress Application

After all dependencies are installed, navigate to the project root directory and 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

Boot Theme Server (Webpack)

Making CSS or JS updates requires running Webpack to recompile and inject the CSS and JS.

  1. Navigate to the theme folder $ cd /web/wp-content/themes/sage

  2. Install npm dependencies using Yarn $ yarn install

  3. Start Webpack $ yarn start

  4. You should now be able to view the site locally at https://localhost:3000

  5. To stop the server, press Control + C

Pull Files and Database from Pantheon

Lando is used to pull uploads and data from Pantheon. See docs here.

lando pull --database=test --files=test --code=none

Deploying

Code committed to the remote master branch is automatically deployed to the dev environment 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 environment, and test can be promoted to the live environment. For more details about the application lifecycle, see https://pantheon.io/agencies/development-workflow/dev-test-live-workflow. Feature branches with a corresponding pull request will create a multi-dev environment used for testing individual features. See https://pantheon.io/docs/multidev for documentation.

Deployment Using Terminus

Test Environment

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 fixme-app-name.test

Live Environment

Code will be promoted from test to live

lando composer run-script deploy:live

or

lando terminus env:deploy fixme-app-name.live

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 69.6%
  • Shell 23.0%
  • Gherkin 4.0%
  • JavaScript 3.4%