Last active
November 24, 2020 18:46
-
-
Save dougvann/71cb97450a9ff0a681ae4a09b79d3185 to your computer and use it in GitHub Desktop.
Lando still uses composer 2.0.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: citw-3.0 | |
recipe: drupal8 | |
config: | |
via: apache:2.4 | |
database: mariadb | |
drush: ^10 | |
drupal: true | |
xdebug: false | |
php: '7.4' | |
webroot: drupal/web | |
ssl: true | |
conf: | |
php: .vscode/php.ini | |
services: | |
# PHPmyAdmin | |
pma: | |
type: phpmyadmin | |
hosts: | |
- database | |
# PHP Container | |
appserver: | |
type: php | |
composer_version: "1.10.1" | |
build: | |
# prestissimo helps in download all composer dependencies in parallel. | |
- composer global require hirak/prestissimo | |
- chmod +x /app/scripts/create_environment_inc.sh && /app/scripts/create_environment_inc.sh | |
- cd $LANDO_MOUNT/drupal && rm -rf vendor && composer install | |
build_as_root: | |
- apt update && apt install libxslt1-dev -y && docker-php-ext-install zip | |
# NODE container | |
node: | |
type: node:10 | |
gulp-cli: latest | |
globals: | |
gulp-cli: "latest" | |
node-sass: "latest" | |
build: | |
- echo "Running NPM Install" | |
- cd drupal/web/themes/custom/ciandt_theme/ && npm install --no-optional --quiet | |
- cd drupal/web/themes/custom/ciandt_theme/ && npm run gulp | |
overrides: | |
ports: | |
- 3001:3001 | |
# Mailhog | |
mailhog: | |
type: mailhog | |
hogfrom: | |
- appserver | |
# Memcached | |
memcached: | |
type: memcached | |
portforward: true | |
tooling: | |
composer: | |
service: appserver | |
cmd: "composer --working-dir=/app/drupal" | |
drush: | |
service: appserver | |
cmd: "/app/drupal/vendor/bin/drush --root=/app/drupal" | |
drupal: | |
service: appserver | |
cmd: "/app/drupal/vendor/bin/drupal --root=/app/drupal" | |
npm: | |
service: node | |
cmd: | |
- "cd drupal/web/themes/custom/ciandt_theme/ && npm install --global gulp-cli && npm install --no-optional --quiet" | |
gulp: | |
service: node | |
cmd: | |
- "cd drupal/web/themes/custom/ciandt_theme/ && gulp styles && gulp js" | |
node: | |
service: node | |
update: | |
description: Builds local dependencies, compiles SASS, runs DB updates | |
cmd: | |
- appserver: cd $LANDO_MOUNT/drupal && rm -rf vendor && composer install | |
- node: | |
- cd drupal/web/themes/custom/ciandt_theme/ && gulp styles && gulp js | |
- appserver: cd $LANDO_WEBROOT && drush @citw.local-br updb -y && drush @citw.local-us updb -y | |
sync-database-br: | |
description: Reset database on local machine. | |
service: appserver | |
cmd: | |
- cd $LANDO_WEBROOT && drush --ssh-options="-l bernardoj" @citw.prod-br sql-dump --gzip --structure-tables-key=cache,cache*,sessions --result-file=/tmp/citw-br.sql | |
- cd $LANDO_WEBROOT && drush @citw.local-br -y rsync bernardoj@35.232.9.77:/tmp/citw-br.sql.gz @citw.local-br:/tmp/citw-br.sql.gz -- --remove-source-files | |
- gunzip -c /tmp/citw-br.sql.gz > /tmp/citw-br.sql | |
# Removes extra info generated by cloud sql. | |
- sed -i '/SET\ @@GLOBAL.GTID/,+2d' /tmp/citw-br.sql | |
- sed -i '/SET\ @@SESSION.SQL_LOG_BIN/d' /tmp/citw-br.sql | |
- cd $LANDO_WEBROOT && drush @citw.local-br sql-query --file=/tmp/citw-br.sql | |
- cd $LANDO_WEBROOT && drush @citw.local-br sql:sanitize -y | |
- cd $LANDO_WEBROOT && drush @citw.local-br cr -y | |
- cd $LANDO_WEBROOT && drush @citw.local-br upwd admin 'admin' | |
#- cd $LANDO_WEBROOT && drush @citw.local-br updb -y | |
#- cd $LANDO_WEBROOT && drush @citw.local-br cim -y | |
#- cd $LANDO_MOUNT/drupal && rm -rf vendor && composer install | |
- cd $LANDO_WEBROOT && drush @citw.local-br cr -y | |
stdout: | |
description: Synchronizing the database... | |
sync-database-uk: | |
description: Reset database on local machine. | |
service: appserver | |
cmd: | |
- cd $LANDO_WEBROOT && drush --ssh-options="-l bernardoj" @citw.prod-uk sql-dump --gzip --structure-tables-key=cache,cache*,sessions --result-file=/tmp/citw-uk.sql | |
- cd $LANDO_WEBROOT && drush @citw.local-uk -y rsync bernardoj@35.232.9.77:/tmp/citw-uk.sql.gz @citw.local-br:/tmp/citw-uk.sql.gz -- --remove-source-files | |
- gunzip -c /tmp/citw-uk.sql.gz > /tmp/citw-uk.sql | |
# Removes extra info generated by cloud sql. | |
- sed -i '/SET\ @@GLOBAL.GTID/,+2d' /tmp/citw-uk.sql | |
- sed -i '/SET\ @@SESSION.SQL_LOG_BIN/d' /tmp/citw-uk.sql | |
- cd $LANDO_WEBROOT && drush @citw.local-uk sql-query --file=/tmp/citw-uk.sql | |
- cd $LANDO_WEBROOT && drush @citw.local-uk sql:sanitize -y | |
- cd $LANDO_WEBROOT && drush @citw.local-uk cr -y | |
- cd $LANDO_WEBROOT && drush @citw.local-uk upwd admin 'admin' | |
- cd $LANDO_WEBROOT && drush @citw.local-uk updb -y | |
#- cd $LANDO_WEBROOT && drush @citw.local-uk cim -y | |
#- cd $LANDO_MOUNT/drupal && rm -rf vendor && composer install | |
- cd $LANDO_WEBROOT && drush @citw.local-uk cr -y | |
stdout: | |
description: Synchronizing the database... | |
sync-files-br: | |
description: Sync files on local | |
service: appserver | |
cmd: | |
- cd $LANDO_WEBROOT && drush @citw.local-br -y rsync @citw.dev-br:%files/ @citw.local-br:%files --exclude-paths=css:js:php | |
- cd $LANDO_WEBROOT && drush @citw.local-br cr -y | |
stdout: | |
description: Synchronizing files ... | |
sync-database-us: | |
description: Reset database on local machine. | |
service: appserver | |
cmd: | |
- cd $LANDO_WEBROOT && drush --ssh-options="-l bernardoj" @citw.prod-us sql-dump --gzip --structure-tables-key=cache,cache*,sessions --result-file=/tmp/citw-us.sql | |
- cd $LANDO_WEBROOT && drush @citw.local-us -y rsync bernardoj@35.232.9.77:/tmp/citw-us.sql.gz @citw.local-us:/tmp/citw-us.sql.gz -- --remove-source-files | |
- gunzip -c /tmp/citw-us.sql.gz > /tmp/citw-us.sql | |
# Removes extra info generated by cloud sql. | |
- sed -i '/SET\ @@GLOBAL.GTID/,+2d' /tmp/citw-us.sql | |
- sed -i '/SET\ @@SESSION.SQL_LOG_BIN/d' /tmp/citw-us.sql | |
- cd $LANDO_WEBROOT && drush @citw.local-us sql-query --file=/tmp/citw-us.sql | |
- cd $LANDO_WEBROOT && drush @citw.local-us sql:sanitize -y | |
- cd $LANDO_WEBROOT && drush @citw.local-us cr -y | |
- cd $LANDO_WEBROOT && drush @citw.local-us upwd admin 'admin' | |
- cd $LANDO_WEBROOT && drush @citw.local-us updb -y | |
#- cd $LANDO_WEBROOT && drush @citw.local-us cim -y | |
#- cd $LANDO_MOUNT/drupal && rm -rf vendor && composer install | |
- cd $LANDO_WEBROOT && drush @citw.local-us cr -y | |
stdout: | |
description: Synchronizing the database ... | |
sync-files-us: | |
description: Sync files on local | |
service: appserver | |
cmd: | |
- cd $LANDO_WEBROOT && drush @citw.local-us -y rsync @citw.dev-us:%files/ @citw.local-us:%files --exclude-paths=css:js:php | |
- cd $LANDO_WEBROOT && drush @citw.local-us cr -y | |
stdout: | |
description: Synchronizing files ... | |
events: | |
post-devel: | |
- appserver: cd $LANDO_WEBROOT && drupal site:mode dev | |
- appserver: cd $LANDO_WEBROOT && drupal moi devel webprofiler | |
post-update: | |
- appserver: cd $LANDO_MOUNT/drupal && composer update --lock | |
- appserver: cd $LANDO_WEBROOT && drupal updb | |
- appserver: cd $LANDO_WEBROOT && drupal upe | |
proxy: | |
appserver: | |
- citw3.lndo.site | |
mailhog: | |
- mailhog3.citw.lndo.site | |
pma: | |
- pma.citw3.lndo.site |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment