Skip to content

Commit

Permalink
Merge branch 'release/2.x/9.3.3' into 2.x-master
Browse files Browse the repository at this point in the history
  • Loading branch information
Raminder Singh committed May 3, 2022
2 parents ced3258 + bedad6a commit 7a21864
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .docker/Dockerfile.nginx-drupal
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ COPY .docker/images/nginx/no-robots.sh /lagoon/entrypoints/20-no-robots.sh
COPY .docker/images/nginx/helpers/ /etc/nginx/helpers/
COPY .docker/images/nginx/drupal /etc/nginx/conf.d/drupal

COPY .docker/images/nginx/conf/ /etc/nginx/conf.d/
COPY .docker/images/nginx/govcms-redirects-map.conf /etc/nginx/govcms-redirects-map.conf

RUN fix-permissions /etc/nginx

COPY --from=cli /app /app
Expand Down
3 changes: 3 additions & 0 deletions .docker/images/nginx/conf/000_govcms_redirect_map.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
map $uri $redirect_uri {
include /etc/nginx/govcms-redirects-map.conf;
}
16 changes: 16 additions & 0 deletions .docker/images/nginx/govcms-redirects-map.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Path redirects
##
## This file provide the ability to redirect paths, this will redirect all paths
## to the incomming host.
##
## @see http://nginx.org/en/docs/http/ngx_http_map_module.html
##
## 1. This will match $uri (uri will always be at least '/')
## 2. Destination of the redirect (must always be prefixed with '/')
## 3. Destination supports external hostnames for full redirects

## Redirect old-paths from the host to new paths.
## ~^/old-path/(.*) /new-path/$1;

# Redirect patterns to a new host.
## ~^/old/(.*) http://other-domain.gov.au/$1;
19 changes: 19 additions & 0 deletions .docker/images/nginx/helpers/011_govcms_redirect.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set $check "no_redirect";

if ($redirect_uri) {
set $check "has_redirect";
}

if ($redirect_uri ~ ^/) {
set $check "$check+has_leading_slash";
}

if ($check = "has_redirect+has_leading_slash") {
# TLS is not terminated by the namespace nginx to prevent
# recusrive redirects we hard code the scheme here.
return 301 https://$host$redirect_uri;
}

if ($check = "has_redirect") {
return 301 $redirect_uri;
}
4 changes: 2 additions & 2 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ SITE_AUDIT_VERSION=7.x-3.x

# Set the version of GovCMS and Drupal Core to use - you can use a tag or branch reference (1.x-dev) here
# See https://github.com/govCMS/govcms8/releases
GOVCMS_PROJECT_VERSION=2.12.1
GOVCMS_PROJECT_VERSION=2.14.0

# Set the Lagoon tag to use for the upstream dockerfiles (e.g. 20.12.0)
# See https://github.com/uselagoon/lagoon-images/releases
LAGOON_IMAGE_VERSION=22.2.0
LAGOON_IMAGE_VERSION=22.4.1

# Set the CLI image name
# Support both legacy (govcms8lagoon/govcms8) and newer (govcms/govcms) images.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
},
"enable-patching": true,
"patches-file": "custom/composer/patches.json",
"installer-types": ["bower-asset", "npm-asset"],
"installer-types": [],
"drupal-scaffold": {
"locations": {
"web-root": "web/"
Expand All @@ -105,7 +105,7 @@
"type:drupal-core"
],
"web/libraries/{$name}": [
"type:drupal-library", "type:bower-asset", "type:npm-asset"
"type:drupal-library"
],
"web/modules/contrib/{$name}": [
"type:drupal-module"
Expand Down

0 comments on commit 7a21864

Please sign in to comment.