From cd99528a206d3e72fd710ef1774db5a3528fb373 Mon Sep 17 00:00:00 2001 From: Tiago Siqueira Date: Mon, 14 Mar 2022 11:04:35 +0100 Subject: [PATCH] Add another DB command, and more settings to php --- _resources/database-dumps/.gitkeep | 0 docker-compose.yml | 4 ++++ scripts/custom-shell-init.sh | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 _resources/database-dumps/.gitkeep diff --git a/_resources/database-dumps/.gitkeep b/_resources/database-dumps/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml index a6529f0..1b238f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,6 +34,10 @@ services: # PHP_FPM_GROUP: wodby # COLUMNS: 80 # Set 80 columns for docker exec -it. # # Read instructions at https://wodby.com/docs/stacks/php/local/#xdebug + PHP_MEMORY_LIMIT: -1 + # PHP_MEMORY_LIMIT: 128M + PHP_CLI_MEMORY_LIMIT: -1 + # PHP_CLI_MEMORY_LIMIT: 128M PHP_MAX_EXECUTION_TIME: 600 PHP_MAX_INPUT_TIME: 600 PHP_MAX_FILE_UPLOADS: 128 diff --git a/scripts/custom-shell-init.sh b/scripts/custom-shell-init.sh index 511aceb..1904b6f 100644 --- a/scripts/custom-shell-init.sh +++ b/scripts/custom-shell-init.sh @@ -32,3 +32,6 @@ chmod +x /usr/local/bin/unitcheck echo -e "#!/bin/bash\nstancheck && cscheck && unitcheck" > /usr/local/bin/allcheck chmod +x /usr/local/bin/allcheck + +echo -e "#!/bin/bash\ndrush sql-drop -y && drush sql-cli < /var/www/html/docker-4-drupal-custom/_resources/database-dumps/\$1.sql && drush cr\nif [ \"\$2\" = true ] ; then\n drush updb -y && drush cr\nfi" > /usr/local/bin/importdb +chmod +x /usr/local/bin/importdb \ No newline at end of file