-
Notifications
You must be signed in to change notification settings - Fork 60
Tips & Tricks
These are tips developers might find useful for developing and debugging within isle-dc.
docker-compose exec drupal bash
make down
make -B docker-compose.yml
make pull
make up
docker inspect -f "{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $(docker ps --format "{{.Names}}" | grep drupal)
Get the Solr URL even when EXPOSE_SOLR is set to false in .env
file
echo http://$(docker inspect -f "{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $(docker ps --format "{{.Names}}" | grep solr)):8983/solr/#/
# Outputs
http://172.21.0.17:8983/solr/#/
⚠ How to reset Docker clearing everything cached (will will destroy any container, volume, stored image, custom networks, etc) and for this reason it should never be ran on a production server. This removes all residual data from previously built docker containers. This will remove containers you've previously exited as well so everything will be removed. This is helps when testing/troubleshooting the build process but is unlikely to be used by many people unless their having issues on the initial build or need to clear out docker entirely.
[WARNING] Read the entire description before using.
docker kill $(docker ps -q) ; docker rm $(docker ps -a -q) ; docker rmi $(docker images -q) ; docker system prune --volumes -a -f ; docker network prune -f ; docker network create gateway
You are using outdated Solr configuration set. Please follow the instructions described in the README.md file for setting up Solr.
You need to capture the current Solr configs and push them into the directory shared by both Drupal and Solr for Solr's configs. When Solr starts, it pulls these configs into RAM. So simply modifying them isn't enough. You will need to restart the Solr server to get them loaded.
# Download the config.zip
docker-compose exec -T drupal with-contenv bash -lc "drush search-api-solr:get-server-config default_solr_server /var/www/drupal/solrconfig.zip"
# Unzip to to the proper location and use "-o" to allow overwrites
docker-compose exec -T drupal with-contenv bash -lc "unzip /var/www/drupal/solrconfig.zip -d /opt/solr/server/solr/ISLANDORA/conf/ -o"
# Now restart Solr
docker-compose restart solr
# Optional
docker-compose exec -T drupal with-contenv bash -lc "drush cr"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api:clear"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api:disable-all"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api:enable-all"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api-solr:finalize-index --force"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api-reindex"
docker-compose exec -T drupal with-contenv bash -lc "drush search-api-index"
Afterwards, the error message about the outdated Solr configuration set should be cleared.