Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@campaignupgrade
Created September 27, 2020 15:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save campaignupgrade/4533ded692fbfaf3c42e9fdd7fe53970 to your computer and use it in GitHub Desktop.
Save campaignupgrade/4533ded692fbfaf3c42e9fdd7fe53970 to your computer and use it in GitHub Desktop.
name: myproject
recipe: wordpress
config:
php: '7.3'
xdebug: false
proxy:
theme:
- localhost:3000 #expose mysql to a consistant local port
services:
database:
type: mysql:5.7.27
portforward: 33060
appserver:
build:
- printf "\n\nInstall app dependencies\n" #runs on first build
- cd /app && wp package install --quiet git@github.com:alwaysblank/blade-generate.git
- cd /app && wp package install --quiet wp-cli/find-command
run:
- printf "\n\nInstall composer dependencies\n" #runs on container start
- cd /app/wp-content/themes/mytheme/ && composer install
- echo "Include /app/dev_assets/scripts/hosts" >> ~/.ssh/config #exposes ssh host names to container
theme:
type: node:10
ports:
- '3000:3000'
build:
- printf "\n\nInstall yarn dependencies\n"
- yarn config set disable-self-update-check true
- cd /app/wp-content/themes/mytheme/ && yarn install
tooling:
yarn:
service: theme
install-deps:
description: Install all yarn and composer dependencies
cmd:
- appserver: cd $LANDO_WEBROOT/wp-content/themes/mytheme && composer install
- theme: cd /app/wp-content/themes/mytheme && yarn install
install-deps-force:
description: Force reinstall dependencies
cmd:
- appserver: cd $LANDO_WEBROOT/wp-content/themes/mytheme && composer install --prefer-source
- theme: cd /app/wp-content/themes/mytheme && rm -r node_modules/ && yarn install --force
yarn-build:
description: Yarn build:production
cmd:
- theme: cd /app/wp-content/themes/mytheme/ && yarn build:production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment