Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
606
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. ## Use jwilder/nginx-proxy
  2. because I hate mapping ports
  3.  
  4. ```bash
  5. docker run -d --name proxy -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
  6. ```
  7.  
  8. ## Use offical mariadb image
  9. with named volume for persistent data
  10.  
  11. ```bash
  12. docker run -d --name drushtest_db -e MYSQL_DATABASE=drupal -e MYSQL_USER=drupal -e MYSQL_PASSWORD=weakpassword -e MYSQL_RANDOM_ROOT_PASSWORD=yes -v drushtest_db_data:/var/lib/mysql mariadb:5.5
  13. ```
  14.  
  15. ## Use offical drupal 7 image
  16. with named volume for html because the drush/drush image needs to be able to see the drupal php code, and a separate named volume for sites because we want to be able to upgrade drupal by deleting html volume without losing our own data
  17.  
  18. ```bash
  19. docker run -d --name drushtest_drupal --link drushtest_db:db -v drushtest_drupal_html:/var/www/html -v drushtest_drupal_sites:/var/www/html/sites -e VIRTUAL_HOST=drushtest.* drupal:7
  20. ```
  21.  
  22. ## Using drush/drush to do a drush site-install
  23.  
  24. ```bash
  25. docker run --rm -it --link drushtest_db:db --volumes-from drushtest_drupal drush/drush:7 -r /var/www/html -y -vv site-install standard --db-url=mysql://drupal:weakpassword@db/drupal --account-name=dev --account-pass=badpassword --account-mail=dev@example.com --site-mail=dev@example.com --site-name="drush drupal test" --sites-subdir=default
  26. ```
  27.  
  28. ## Using drush/drush to list the drupal modules
  29.  
  30. ```bash
  31. docker run --rm -it --link drushtest_db:db --volumes-from drushtest_drupal drush/drush:7 -r /var/www/html pm-list
  32. ```
  33.  
  34. ## Drop in a makefile for drush
  35.  
  36. ```bash
  37. docker cp drupal.make.yml drushtest_drupal:/var/www/html/sites/
  38. ```
  39.  
  40. ## Do the make
  41.  
  42. ```bash
  43. docker run --rm -it --link drushtest_db:db -w /var/www/html/sites --volumes-from drushtest_drupal drush/drush:7 make -y --no-core --working-copy --contrib-destination=all drupal.make.yml
  44. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement