wunderio / drupal-project

Wunder's template for Drupal projects designed to work automatically with Lando, CircleCI and Helm.
GNU General Public License v2.0
35 stars 6 forks source link

Create .lando folder for Lando scripts & config #61

Closed tormi closed 5 years ago

tormi commented 5 years ago

Possible project structure

./
|-- .lando
   |-- .env
   |-- php.ini
   |-- syncdb.sh
|-- .lando.yml

.lando.yml

name: project
recipe: drupal8

env_file:
  - .lando/.env

services:
  appserver:
    type: php
    config:
      php: .lando/php.ini

tooling:
  syncdb:
    description: Synchronise local database with stage environment
    cmd:
      - appserver: /app/.lando/syncdb.sh

syncdb.sh

#!/bin/sh
set -exu

# Synchronise local database with stage environment
cd /app
drush @stage sql-dump --structure-tables-list=cache,cache_*,history,sessions,watchdog > /app/dump.sql
drush @local sql-drop -y
drush @local sql-query --file=/app/dump.sql -y
drush @local cc drush
drush @local cr
rm /app/dump.sql
tormi commented 5 years ago

cc: @floretan, @hkirsman, @ragnarkurmwunder

tormi commented 5 years ago

Resolved in #62.