Skip to content
49 changes: 49 additions & 0 deletions docs/installation/docker/site-template/customizations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Customizations

The following sections describe optional customizations you can make to further modify your Islandora site.

## Blocking Connections

### Blocking IP Addresses

#### iptables

If your server uses iptables, you can block a range of IP addresses using the following command

`iptables -I DOCKER-USER -s XXX.XXX.XXX.0/24 -j DROP`

### Blocking by User Agent

You can modify how nginx handles certain user agents by modifying `/etc/nginx/shared/drupal.defaults.conf` inside your Drupal container. For example, by adding:
Copy link
Member

@joecorall joecorall Jul 24, 2025

Choose a reason for hiding this comment

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

I think we should add some guidance here on how to do this.

We should utilize buildkit's nginx conf that includes rules from any *.conf file in /etc/nginx/http.d/ in the drupal container. So IMO the guidance should be to bind mount a new file in that location and/or add that to your Dockerfile build. My preference would be to bind mount it in docker compose but building it in the Dockerfile is probably more durable

Copy link
Member

Choose a reason for hiding this comment

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

In fact, I think this is such a vital part of having a web property available on the internet we should probably just put this rule into the dockerfile in site template with a conf file in that directory so people can edit it

Copy link
Member

Choose a reason for hiding this comment

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

Actually making the regex an env var in isle-buildkit might be the best option

```
if ($http_user_agent ~ (OAI-SearchBot|ChatGPT|Scrapy|ImagesiftBot|YandexBot|Bytespider|ClaudeBot|Sogou|SemrushBot|AcademicBotRTU|PetalBot|GPTBot|DataForSeoBot|test-bot) ) {
return 403;
}
```

## Traefik customizations

### TLS Settings

Traefik allows you to modify security settings by doing things like setting a minimum TLS version or specifying cipher suites. Isle Site Template ships with two versions of the TLS settings file, one [for development](https://github.com/Islandora-Devops/isle-site-template/blob/main/dev-tls.yml), and one [for production](https://github.com/Islandora-Devops/isle-site-template/blob/main/prod-tls.yml).

These files are mounted as volumes in the Traefik containers, so you can modify them as desired.

More information is available in the [Traefik documentation](https://doc.traefik.io/traefik/https/tls/#tls-options)

### Hiding Fedora from the public

By default, your Fedora repository will be exposed to the public at fcrepo.${DOMAIN}. If you don't want the public to be able to access your repository you can add the `traefik-disable` label to the fcrepo-prod service in your docker-compose.yml.

```
labels:
<<: [*traefik-disable, *fcrepo-labels]
```

If you do this, you can remove the fcrepo domain from your DNS records.

### Exposing ActiveMQ, Blazegraph, and Solr

By default, these services are hidden by Traefik. If you want to allow access to them, you need to remove the `traefik-disable` label from your docker-compose.yml.

You will also need to add their URL to your DNS record. The URLs are defined in the docker-compose.yml, and by default will be activemq.{DOMAIN}, blazegraph.{DOMAIN}, and solr.{DOMAIN}
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ nav:
- 'Working in Your Containers': 'installation/docker/site-template/containers.md'
- 'Updating': 'installation/docker/site-template/updating.md'
- 'Back Up and Restore': 'installation/docker/site-template/backup.md'
- 'Customizations' : 'installation/docker/site-template/customizations.md'
- 'Converting ISLE-DC to Site Template': 'installation/docker/converting.md'

- 'Ansible Playbook': 'installation/playbook.md'
- Manual Installation:
- 'Introduction': 'installation/manual/introduction.md'
Expand Down