You are here

deploy.sh in Convert Media Tags to Markup 2.x

Same filename and directory in other branches
  1. 8 scripts/deploy.sh
#!/bin/bash
#
# Assuming you have the latest version Docker installed, this script will
# fully create or update your development environment.
#
set -e

echo ''
echo 'About to try to get the latest version of'
echo 'https://hub.docker.com/r/dcycle/drupal/ from the Docker hub. This image'
echo 'is updated automatically every Wednesday with the latest version of'
echo 'Drupal and Drush. If the image has changed since the latest deployment,'
echo 'the environment will be completely rebuilt based on this image.'
if [ "$1" == 9 ]; then
  docker pull dcycle/drupal:9
else
  docker pull dcycle/drupal:8drush
fi

echo ''
echo '-----'
echo 'About to start persistent (-d) containers based on the images defined'
echo 'in ./Dockerfile and ./docker-compose.yml. We are also telling'
echo 'docker-compose to rebuild the images if they are out of date.'
if [ "$1" == 9 ]; then
  docker-compose -f docker-compose.yml -f docker-compose.drupal9.yml up -d --build
else
  docker-compose up -d --build
fi

echo ''
echo '-----'
echo 'Running the deploy script on the running containers. This installs'
echo 'Drupal if it is not yet installed.'
docker-compose exec drupal /docker-resources/scripts/deploy-on-container.sh

echo ''
echo '-----'
echo ''
echo 'If all went well you can now access your site at:'
./scripts/uli.sh
echo '-----'
echo ''

File

scripts/deploy.sh
View source
  1. #!/bin/bash
  2. #
  3. # Assuming you have the latest version Docker installed, this script will
  4. # fully create or update your development environment.
  5. #
  6. set -e
  7. echo ''
  8. echo 'About to try to get the latest version of'
  9. echo 'https://hub.docker.com/r/dcycle/drupal/ from the Docker hub. This image'
  10. echo 'is updated automatically every Wednesday with the latest version of'
  11. echo 'Drupal and Drush. If the image has changed since the latest deployment,'
  12. echo 'the environment will be completely rebuilt based on this image.'
  13. if [ "$1" == 9 ]; then
  14. docker pull dcycle/drupal:9
  15. else
  16. docker pull dcycle/drupal:8drush
  17. fi
  18. echo ''
  19. echo '-----'
  20. echo 'About to start persistent (-d) containers based on the images defined'
  21. echo 'in ./Dockerfile and ./docker-compose.yml. We are also telling'
  22. echo 'docker-compose to rebuild the images if they are out of date.'
  23. if [ "$1" == 9 ]; then
  24. docker-compose -f docker-compose.yml -f docker-compose.drupal9.yml up -d --build
  25. else
  26. docker-compose up -d --build
  27. fi
  28. echo ''
  29. echo '-----'
  30. echo 'Running the deploy script on the running containers. This installs'
  31. echo 'Drupal if it is not yet installed.'
  32. docker-compose exec drupal /docker-resources/scripts/deploy-on-container.sh
  33. echo ''
  34. echo '-----'
  35. echo ''
  36. echo 'If all went well you can now access your site at:'
  37. ./scripts/uli.sh
  38. echo '-----'
  39. echo ''