Skip to content

Commit

Permalink
added helpful commands
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdentremont committed Jun 3, 2024
1 parent e83a989 commit 5673b54
Showing 1 changed file with 78 additions and 1 deletion.
79 changes: 78 additions & 1 deletion docs/installation/docker/site-template/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,81 @@ docker compose exec -T drupal-dev with-contenv bash -lc 'echo ${DRUPAL_DEFAULT_S

and

`docker compose exec -T drupal-dev -lc 'YOUR COMMAND'`
`docker compose exec -T drupal-dev -lc 'YOUR COMMAND'`


## Helpful Commands

### Checking logs

You can read logs for a container with:

```
docker-compose logs service_name
```

For example, to read nginx logs for Drupal, use `docker-compose logs drupal-dev`.

If you don't know what you're looking for exactly, you can turn on the fire hose and look through all logs by dropping the service name and simply using:

```
docker-compose logs
```

### Reindex Solr

You can reindex Solr through the Drupal admin page, or via drush commands by queuing for reindex:

```
docker compose exec -T drupal-dev with-contenv bash -lc 'drush --root /var/www/drupal/web -l ${DRUPAL_DEFAULT_SITE_URL} search-api-reindex'
```

then triggering the reindex:

```
docker compose exec -T drupal-dev with-contenv bash -lc 'drush --root /var/www/drupal/web -l ${DRUPAL_DEFAULT_SITE_URL} search-api-index'
```

### Reindex Fedora

!!! note
This requires the [Views Bulk Operations module](https://www.drupal.org/project/views_bulk_operations)


You can reindex all of your Drupal data into Fedora, by running the following commands:

```
docker compose exec -T drupal-dev with-contenv bash -lc 'drush --root /var/www/drupal/web -l ${DRUPAL_DEFAULT_SITE_URL} vbo-exec non_fedora_files emit_file_event --configuration="queue=islandora-indexing-fcrepo-file-external&event=Update"'
```

```
docker compose exec -T drupal-dev with-contenv bash -lc 'drush --root /var/www/drupal/web -l ${DRUPAL_DEFAULT_SITE_URL} vbo-exec all_taxonomy_terms emit_term_event --configuration="queue=islandora-indexing-fcrepo-content&event=Update"'
```

```
docker compose exec -T drupal-dev with-contenv bash -lc 'drush --root /var/www/drupal/web -l ${DRUPAL_DEFAULT_SITE_URL} vbo-exec content emit_node_event --configuration="queue=islandora-indexing-fcrepo-content&event=Update"'
```

```
docker compose exec -T drupal-dev with-contenv bash -lc 'drush --root /var/www/drupal/web -l ${DRUPAL_DEFAULT_SITE_URL} vbo-exec media emit_media_event --configuration="queue=islandora-indexing-fcrepo-media&event=Update"'
```

### Reindex Blazegraph

!!! note
This requires the [Views Bulk Operations module](https://www.drupal.org/project/views_bulk_operations)


You can reindex all of your Drupal data into Blazegraph, by running the following commands:

```
docker compose exec -T drupal-dev with-contenv bash -lc 'drush --root /var/www/drupal/web -l ${DRUPAL_DEFAULT_SITE_URL} vbo-exec all_taxonomy_terms emit_term_event --configuration="queue=islandora-indexing-triplestore-index&event=Update"'
```

```
docker compose exec -T drupal-dev with-contenv bash -lc 'drush --root /var/www/drupal/web -l ${DRUPAL_DEFAULT_SITE_URL} vbo-exec content emit_node_event --configuration="queue=islandora-indexing-triplestore-index&event=Update"'
```

```
docker compose exec -T drupal-dev with-contenv bash -lc 'drush --root /var/www/drupal/web -l ${DRUPAL_DEFAULT_SITE_URL} vbo-exec media emit_media_event --configuration="queue=islandora-indexing-triplestore-index&event=Update"'
```

2 comments on commit 5673b54

@ajstanley
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All references to docker-compose should now be docker compose

@joshdentremont
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I copied this from the isle-dc docs, which still have the dash in the commands. It should be fixed now.

Please sign in to comment.