From 74fe2af74347d5c9d0afcbe57ba19d69cf487cf6 Mon Sep 17 00:00:00 2001 From: joshdentremont Date: Fri, 28 Feb 2025 11:56:10 -0400 Subject: [PATCH 1/3] Update staging site instructions --- .../docker/site-template/setup.md | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/docs/installation/docker/site-template/setup.md b/docs/installation/docker/site-template/setup.md index c29cf9f85..4955502c0 100644 --- a/docs/installation/docker/site-template/setup.md +++ b/docs/installation/docker/site-template/setup.md @@ -31,14 +31,40 @@ This documentation assumes you will be building your production image on the pro ## Adding a Staging Site -The process for setting up a staging site is the same as production, but you will need to change the `DOMAIN` variable in your `.env` file on your staging server, to contain the URL for your staging site. +The process for setting up a staging site is the same as production, but you will need to use a different URL. Since the URL is set in the .env file, which is checked into your git repository, you may wish to use docker-compose.override.yml for this. In docker-compose.override.yml you will need to override anywhere the `DOMAIN` variable is used, for example: -!!! Note - By default, the `.env` file is stored in the git repository for your site, which means there is only support for one URL. If you are adding a staging site, you may wish to modify this so that you do not accidentally push your staging URL to your git repository. +``` +services: + cantaloupe-prod: + labels: + traefik.http.routers.cantaloupe_http.rule: &traefik-host-cantaloupe-prod Host(`staging-url.com`) && PathPrefix(`/cantaloupe`) + traefik.http.routers.cantaloupe_https.rule: *traefik-host-cantaloupe-prod + drupal-prod: + environment: + DRUPAL_DEFAULT_CANTALOUPE_URL: "https://staging-url.com/cantaloupe/iiif/2" + DRUPAL_DEFAULT_SITE_URL: "staging-url.com" + DRUPAL_DRUSH_URI: "https://staging-url.com" + labels: + traefik.http.routers.drupal_http.rule: &traefik-host-drupal-prod Host(`staging-url.com`) + traefik.http.routers.drupal_https.rule: *traefik-host-drupal-prod + fcrepo-prod: + environment: + FCREPO_ALLOW_EXTERNAL_DRUPAL: "https://staging-url.com" + labels: + traefik.http.routers.fcrepo_http.rule: &traefik-host-fcrepo-prod Host(`fcrepo.staging-url.com`) + traefik.http.routers.fcrepo_https.rule: *traefik-host-fcrepo-prod + traefik-prod: + networks: + default: + aliases: + # Allow services to connect on the same name/port as the outside. + - "staging-url.com" # Drupal is at the root domain. + - "fcrepo.staging-url.com" +``` !!! note "Restricting Access to Staging Servers" - Using letsencrypt to generate your certs requires port 80 to be accessible on your server. If you would like to keep your site private by limiting access to certain IP addresses, you can still firewall port 443, but you will have to leave port 80 open. If you need to firewall port 80 as well, you will have to either use your own certs or look into another method of generating certs. + Using letsencrypt to generate your certs requires port 80 to be accessible on your server. If you would like to keep your site private by limiting access to certain IP addresses, you can still firewall port 443, but you will have to leave port 80 open. Alternatively, you can use [Traefik's IPAllowList middleware](https://doc.traefik.io/traefik/middlewares/http/ipallowlist/) to restrict access to outisde IPs. ## Adding Demo Content From 2925adf60df0e059782e1c70e81f58216a1a7212 Mon Sep 17 00:00:00 2001 From: joshdentremont Date: Wed, 5 Mar 2025 14:15:24 -0400 Subject: [PATCH 2/3] Update docs/installation/docker/site-template/setup.md Co-authored-by: Adam <607975+adam-vessey@users.noreply.github.com> --- docs/installation/docker/site-template/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/docker/site-template/setup.md b/docs/installation/docker/site-template/setup.md index 4955502c0..8db0c3ef5 100644 --- a/docs/installation/docker/site-template/setup.md +++ b/docs/installation/docker/site-template/setup.md @@ -64,7 +64,7 @@ services: !!! note "Restricting Access to Staging Servers" - Using letsencrypt to generate your certs requires port 80 to be accessible on your server. If you would like to keep your site private by limiting access to certain IP addresses, you can still firewall port 443, but you will have to leave port 80 open. Alternatively, you can use [Traefik's IPAllowList middleware](https://doc.traefik.io/traefik/middlewares/http/ipallowlist/) to restrict access to outisde IPs. + Using letsencrypt to generate your certs requires port 80 to be accessible on your server. If you would like to keep your site private by limiting access to certain IP addresses, you can still firewall port 443, but you will have to leave port 80 open. Alternatively, you can use [Traefik's IPAllowList middleware](https://doc.traefik.io/traefik/middlewares/http/ipallowlist/) to restrict access to outside IPs. ## Adding Demo Content From 80b14a6ef4094746d75e20866939436b760d04a6 Mon Sep 17 00:00:00 2001 From: joshdentremont Date: Wed, 5 Mar 2025 15:51:07 -0400 Subject: [PATCH 3/3] Update docs/installation/docker/site-template/setup.md Co-authored-by: Adam <607975+adam-vessey@users.noreply.github.com> --- docs/installation/docker/site-template/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/docker/site-template/setup.md b/docs/installation/docker/site-template/setup.md index 8db0c3ef5..33f768ad0 100644 --- a/docs/installation/docker/site-template/setup.md +++ b/docs/installation/docker/site-template/setup.md @@ -31,7 +31,7 @@ This documentation assumes you will be building your production image on the pro ## Adding a Staging Site -The process for setting up a staging site is the same as production, but you will need to use a different URL. Since the URL is set in the .env file, which is checked into your git repository, you may wish to use docker-compose.override.yml for this. In docker-compose.override.yml you will need to override anywhere the `DOMAIN` variable is used, for example: +The process for setting up a staging site is the same as production, but you will need to use a different URL. Since the URL is set in the `.env` file, which is checked into your git repository, you may wish to use `docker-compose.override.yml` for this. In `docker-compose.override.yml` you will need to override anywhere the `DOMAIN` variable is used, for example: ``` services: