Skip to content

Instantly share code, notes, and snippets.

@weitzman
Last active July 19, 2018 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weitzman/152b7579ef39bf1c237bfeadf82d529a to your computer and use it in GitHub Desktop.
Save weitzman/152b7579ef39bf1c237bfeadf82d529a to your computer and use it in GitHub Desktop.
mass.gov blog post
ahoyapi: v2
commands:
exec:
# These env variables come from https://github.com/wodby/docker4drupal/issues/273
cmd: docker-compose exec -e COLUMNS=$(tput cols) -e LINES=$(tput lines) -e TERM=$TERM drupal "$@"
usage: Run a command in the container
bash:
cmd: ahoy exec bash
usage: Open a shell inside the container.
up:
cmd: docker-compose up -d "$@"
usage: Start the containers.
down:
cmd: docker-compose down "$@"
usage: Stop and delete the containers.
stop:
cmd: docker-compose stop "$@"
usage: Stop the containers.
pull:
cmd: docker-compose down --remove-orphans && docker-compose pull && docker-compose up -d
usage: Refresh the database.
updatedb:
cmd: ahoy exec scripts/ma-refresh-local --skip-db-prep
usage: Run after a git pull, so that pending updates are run.
prune:
cmd: docker system prune "$@"
usage: Prune unused images, etc. to gain back disk space.
comi:
cmd: ahoy exec composer install -o "$@"
usage: Run 'composer install' in the container.
yarn:
cmd: ahoy exec yarn "$@"
usage: Run 'yarn install' in the container.
drush:
cmd: ahoy exec vendor/bin/drush "$@"
usage: Run Drush in the container
uli:
cmd: open $(ahoy drush uli "$@" | tr -d '\n')
usage: Run uli in the container and then open local browser.
test:
cmd: ahoy exec scripts/ma-test "$@"
usage: Run all tests in the container.
tail:
cmd: docker-compose logs -f drupal
usage: Tail the Apache + PHP logs.
blackfire:
cmd: ahoy exec blackfire "$@"
usage: "Profile CLI requests. Usages: blackfire curl http://mass.local OR blackfire run --samples=10 drush st"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment