Last active
March 20, 2022 09:51
-
-
Save mortenson/1080f7bc55285ec2e811a676363927d6 to your computer and use it in GitHub Desktop.
What I currently use for local Drupal/Tome dev
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
#! /bin/bash | |
# This runs a new Docker container, mounts the current directory (Drupal root), | |
# and runs an arbitrary drush command, in case you don't want to run it in dsession. | |
sudo docker run --rm -it --init -v "$(pwd)":/var/www/tome mortenson/tome drush "$@" |
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
#!/bin/bash | |
# This runs a new Docker container, mounts the current directory (Drupal root), | |
# runs a Drush server, then pops you into a bash session so you can run more | |
# Drush/composer commands. Usage: dsession | |
sudo docker run --rm -it -p 8888:8888 -v "$(pwd)":/var/www/tome mortenson/tome bash -c "drush runserver 0.0.0.0:8888 & sleep 2 && bash" |
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
#!/bin/bash | |
# This runs a new Docker container, mounts the current directory (Drupal root), | |
# runs a Drush server, runs a chromedriver instance, and executes the PHPUnit | |
# test you provide it with. Usage: dtest <path to test> | |
sudo docker run --rm -it --init -p 8889:8889 --env "SIMPLETEST_DB=sqlite://localhost/.test.sqlite" --env "SIMPLETEST_BASE_URL=http://127.0.0.1:8889" -v "$(pwd)":/var/www/tome mortenson/tome bash -c "drush runserver 8889 & chromedriver --port=4444 & sleep 2 && ./vendor/bin/phpunit -c core $@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment