-
Notifications
You must be signed in to change notification settings - Fork 72
Site Template Customizations Documentation #2312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
joshdentremont
wants to merge
10
commits into
Islandora:main
Choose a base branch
from
joshdentremont:st-customizations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b913f82
updated layout of docker installion pages
joshdentremont c04a8b7
added customization page with placeholders for topics
joshdentremont 06a6cf4
merged main
joshdentremont 74be2ec
added info on TLS customization
joshdentremont 0466b57
added instructions for hiding fedora or exposing activemq, blazegraph…
joshdentremont d647bc5
added instructions for blocking bots
joshdentremont 735b029
Update customizations.md
joshdentremont 4dde324
Merge branch 'main' into st-customizations
joshdentremont db5f737
Update docs/installation/docker/site-template/customizations.md
joshdentremont e388a42
Update docs/installation/docker/site-template/customizations.md
joshdentremont File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
``` | ||
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} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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 durableThere was a problem hiding this comment.
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
There was a problem hiding this comment.
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