diff --git a/.github/workflows/maintenance.yml b/.github/workflows/maintenance.yml
new file mode 100644
index 000000000..28a2242ce
--- /dev/null
+++ b/.github/workflows/maintenance.yml
@@ -0,0 +1,36 @@
+name: Set maintenance mode
+
+on:
+ workflow_dispatch:
+ inputs:
+ environment:
+ required: true
+ type: choice
+ options:
+ - test
+ - production
+ mode:
+ required: true
+ type: choice
+ options:
+ - enable
+ - disable
+
+jobs:
+ set-maintenance-mode:
+ name: Set maintenance mode
+ runs-on: ubuntu-latest
+ environment: ${{ inputs.environment }}
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Enable or disable maintenance mode
+ uses: DFE-Digital/github-actions/maintenance@master
+ with:
+ azure-credentials: ${{ secrets.AZURE_CREDENTIALS}}
+ environment: ${{ inputs.environment }}
+ mode: ${{ inputs.mode }}
+ docker-repository: ghcr.io/dfe-digital/apply-for-qualified-teacher-status-maintenance
+ github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/Makefile b/Makefile
index 61d63d9f3..226465677 100644
--- a/Makefile
+++ b/Makefile
@@ -219,3 +219,20 @@ production-cluster:
get-cluster-credentials: set-azure-account
az aks get-credentials --overwrite-existing -g ${CLUSTER_RESOURCE_GROUP_NAME} -n ${CLUSTER_NAME}
kubelogin convert-kubeconfig -l $(if ${GITHUB_ACTIONS},spn,azurecli)
+
+maintenance-image-push: ## Build and push maintenance page image: make production maintenance-image-push GITHUB_TOKEN=x [MAINTENANCE_IMAGE_TAG=y]
+ $(if ${GITHUB_TOKEN},, $(error Provide a valid Github token with write:packages permissions as GITHUB_TOKEN variable))
+ $(if ${MAINTENANCE_IMAGE_TAG},, $(eval export MAINTENANCE_IMAGE_TAG=$(shell date +%s)))
+ docker build -t ghcr.io/dfe-digital/apply-for-qualified-teacher-status-maintenance:${MAINTENANCE_IMAGE_TAG} maintenance_page
+ echo ${GITHUB_TOKEN} | docker login ghcr.io -u USERNAME --password-stdin
+ docker push ghcr.io/dfe-digital/apply-for-qualified-teacher-status-maintenance:${MAINTENANCE_IMAGE_TAG}
+
+maintenance-fail-over: get-cluster-credentials ## Fail main app over to the maintenance page. Requires an existing maintenance docker image: make production maintenance-fail-over MAINTENANCE_IMAGE_TAG=y. See https://github.com/DFE-Digital/teacher-services-cloud/blob/main/documentation/maintenance-page.md#github-token
+ $(eval export CONFIG)
+ ./maintenance_page/scripts/failover.sh
+
+enable-maintenance: maintenance-image-push maintenance-fail-over ## Build, push, fail over: make production enable-maintenance GITHUB_TOKEN=x [MAINTENANCE_IMAGE_TAG=y]
+
+disable-maintenance: get-cluster-credentials ## Fail back to the main app: make production disable-maintenance
+ $(eval export CONFIG)
+ ./maintenance_page/scripts/failback.sh
diff --git a/maintenance_page/Dockerfile b/maintenance_page/Dockerfile
new file mode 100644
index 000000000..4839fba21
--- /dev/null
+++ b/maintenance_page/Dockerfile
@@ -0,0 +1,4 @@
+FROM nginxinc/nginx-unprivileged:1.26.1
+
+COPY nginx.conf /etc/nginx/nginx.conf
+COPY ./html/ /usr/share/nginx/html
diff --git a/maintenance_page/html/assets/fonts/bold-affa96571d-v2-b092ddd6.woff b/maintenance_page/html/assets/fonts/bold-affa96571d-v2-b092ddd6.woff
new file mode 100644
index 000000000..48fbcf59c
Binary files /dev/null and b/maintenance_page/html/assets/fonts/bold-affa96571d-v2-b092ddd6.woff differ
diff --git a/maintenance_page/html/assets/fonts/bold-b542beb274-v2-616e5f21.woff2 b/maintenance_page/html/assets/fonts/bold-b542beb274-v2-616e5f21.woff2
new file mode 100644
index 000000000..81fd14985
Binary files /dev/null and b/maintenance_page/html/assets/fonts/bold-b542beb274-v2-616e5f21.woff2 differ
diff --git a/maintenance_page/html/assets/fonts/light-94a07e06a1-v2-bb962e0c.woff2 b/maintenance_page/html/assets/fonts/light-94a07e06a1-v2-bb962e0c.woff2
new file mode 100644
index 000000000..1eb101571
Binary files /dev/null and b/maintenance_page/html/assets/fonts/light-94a07e06a1-v2-bb962e0c.woff2 differ
diff --git a/maintenance_page/html/assets/fonts/light-f591b13f7d-v2-f03d82c2.woff b/maintenance_page/html/assets/fonts/light-f591b13f7d-v2-f03d82c2.woff
new file mode 100644
index 000000000..3b26d5ffd
Binary files /dev/null and b/maintenance_page/html/assets/fonts/light-f591b13f7d-v2-f03d82c2.woff differ
diff --git a/maintenance_page/html/assets/images/favicon-7ddbfd51.ico b/maintenance_page/html/assets/images/favicon-7ddbfd51.ico
new file mode 100644
index 000000000..20129a0bb
Binary files /dev/null and b/maintenance_page/html/assets/images/favicon-7ddbfd51.ico differ
diff --git a/maintenance_page/html/assets/images/favicon-7ddbfd51.ico.br b/maintenance_page/html/assets/images/favicon-7ddbfd51.ico.br
new file mode 100644
index 000000000..0cc99adbe
Binary files /dev/null and b/maintenance_page/html/assets/images/favicon-7ddbfd51.ico.br differ
diff --git a/maintenance_page/html/assets/images/favicon-7ddbfd51.ico.gz b/maintenance_page/html/assets/images/favicon-7ddbfd51.ico.gz
new file mode 100644
index 000000000..718be16ea
Binary files /dev/null and b/maintenance_page/html/assets/images/favicon-7ddbfd51.ico.gz differ
diff --git a/maintenance_page/html/assets/images/favicon-ec189703.svg b/maintenance_page/html/assets/images/favicon-ec189703.svg
new file mode 100644
index 000000000..67d7ef919
--- /dev/null
+++ b/maintenance_page/html/assets/images/favicon-ec189703.svg
@@ -0,0 +1 @@
+
diff --git a/maintenance_page/html/assets/images/favicon-ec189703.svg.br b/maintenance_page/html/assets/images/favicon-ec189703.svg.br
new file mode 100644
index 000000000..93b1f4b60
Binary files /dev/null and b/maintenance_page/html/assets/images/favicon-ec189703.svg.br differ
diff --git a/maintenance_page/html/assets/images/favicon-ec189703.svg.gz b/maintenance_page/html/assets/images/favicon-ec189703.svg.gz
new file mode 100644
index 000000000..c2bced318
Binary files /dev/null and b/maintenance_page/html/assets/images/favicon-ec189703.svg.gz differ
diff --git a/maintenance_page/html/assets/images/govuk-crest-2x.png b/maintenance_page/html/assets/images/govuk-crest-2x.png
new file mode 100644
index 000000000..78e751cc2
Binary files /dev/null and b/maintenance_page/html/assets/images/govuk-crest-2x.png differ
diff --git a/maintenance_page/html/assets/images/govuk-crest.png b/maintenance_page/html/assets/images/govuk-crest.png
new file mode 100644
index 000000000..bed4efe41
Binary files /dev/null and b/maintenance_page/html/assets/images/govuk-crest.png differ
diff --git a/maintenance_page/html/assets/images/govuk-icon-180-e0835e78.png b/maintenance_page/html/assets/images/govuk-icon-180-e0835e78.png
new file mode 100644
index 000000000..7c33beba8
Binary files /dev/null and b/maintenance_page/html/assets/images/govuk-icon-180-e0835e78.png differ
diff --git a/maintenance_page/html/assets/images/govuk-icon-192-7b8e00f8.png b/maintenance_page/html/assets/images/govuk-icon-192-7b8e00f8.png
new file mode 100644
index 000000000..35e51d7a7
Binary files /dev/null and b/maintenance_page/html/assets/images/govuk-icon-192-7b8e00f8.png differ
diff --git a/maintenance_page/html/assets/images/govuk-icon-512-587f7e53.png b/maintenance_page/html/assets/images/govuk-icon-512-587f7e53.png
new file mode 100644
index 000000000..f5eb6f461
Binary files /dev/null and b/maintenance_page/html/assets/images/govuk-icon-512-587f7e53.png differ
diff --git a/maintenance_page/html/assets/images/govuk-icon-mask-c3a9868b.svg b/maintenance_page/html/assets/images/govuk-icon-mask-c3a9868b.svg
new file mode 100644
index 000000000..e10ff6cc3
--- /dev/null
+++ b/maintenance_page/html/assets/images/govuk-icon-mask-c3a9868b.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/maintenance_page/html/assets/images/govuk-icon-mask-c3a9868b.svg.br b/maintenance_page/html/assets/images/govuk-icon-mask-c3a9868b.svg.br
new file mode 100644
index 000000000..90e3b00ec
Binary files /dev/null and b/maintenance_page/html/assets/images/govuk-icon-mask-c3a9868b.svg.br differ
diff --git a/maintenance_page/html/assets/images/govuk-icon-mask-c3a9868b.svg.gz b/maintenance_page/html/assets/images/govuk-icon-mask-c3a9868b.svg.gz
new file mode 100644
index 000000000..a4b9b090a
Binary files /dev/null and b/maintenance_page/html/assets/images/govuk-icon-mask-c3a9868b.svg.gz differ
diff --git a/maintenance_page/html/assets/images/govuk-opengraph-image-bd4c811b.png b/maintenance_page/html/assets/images/govuk-opengraph-image-bd4c811b.png
new file mode 100644
index 000000000..4d0e312ff
Binary files /dev/null and b/maintenance_page/html/assets/images/govuk-opengraph-image-bd4c811b.png differ
diff --git a/maintenance_page/html/assets/images/icon-close-cross-black-692c7df5.svg b/maintenance_page/html/assets/images/icon-close-cross-black-692c7df5.svg
new file mode 100644
index 000000000..bab6572e6
--- /dev/null
+++ b/maintenance_page/html/assets/images/icon-close-cross-black-692c7df5.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/maintenance_page/html/assets/images/icon-close-cross-black-692c7df5.svg.br b/maintenance_page/html/assets/images/icon-close-cross-black-692c7df5.svg.br
new file mode 100644
index 000000000..fd49b8d60
Binary files /dev/null and b/maintenance_page/html/assets/images/icon-close-cross-black-692c7df5.svg.br differ
diff --git a/maintenance_page/html/assets/images/icon-tag-remove-cross-5a9b07c6.svg b/maintenance_page/html/assets/images/icon-tag-remove-cross-5a9b07c6.svg
new file mode 100644
index 000000000..c46b61c59
--- /dev/null
+++ b/maintenance_page/html/assets/images/icon-tag-remove-cross-5a9b07c6.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/maintenance_page/html/assets/images/icon-tag-remove-cross-5a9b07c6.svg.br b/maintenance_page/html/assets/images/icon-tag-remove-cross-5a9b07c6.svg.br
new file mode 100644
index 000000000..37bae3c68
Binary files /dev/null and b/maintenance_page/html/assets/images/icon-tag-remove-cross-5a9b07c6.svg.br differ
diff --git a/maintenance_page/html/assets/images/icon-tag-remove-cross-5a9b07c6.svg.gz b/maintenance_page/html/assets/images/icon-tag-remove-cross-5a9b07c6.svg.gz
new file mode 100644
index 000000000..a2cc58638
Binary files /dev/null and b/maintenance_page/html/assets/images/icon-tag-remove-cross-5a9b07c6.svg.gz differ
diff --git a/maintenance_page/html/assets/images/icon-tag-remove-cross-white-d540bf9f.svg b/maintenance_page/html/assets/images/icon-tag-remove-cross-white-d540bf9f.svg
new file mode 100644
index 000000000..2df2570fb
--- /dev/null
+++ b/maintenance_page/html/assets/images/icon-tag-remove-cross-white-d540bf9f.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/maintenance_page/html/assets/images/icon-tag-remove-cross-white-d540bf9f.svg.br b/maintenance_page/html/assets/images/icon-tag-remove-cross-white-d540bf9f.svg.br
new file mode 100644
index 000000000..8dbb85a0d
Binary files /dev/null and b/maintenance_page/html/assets/images/icon-tag-remove-cross-white-d540bf9f.svg.br differ
diff --git a/maintenance_page/html/assets/images/icon-tag-remove-cross-white-d540bf9f.svg.gz b/maintenance_page/html/assets/images/icon-tag-remove-cross-white-d540bf9f.svg.gz
new file mode 100644
index 000000000..80212fb56
Binary files /dev/null and b/maintenance_page/html/assets/images/icon-tag-remove-cross-white-d540bf9f.svg.gz differ
diff --git a/maintenance_page/html/assets/images/icon-toggle-plus-minus-257426a1.svg b/maintenance_page/html/assets/images/icon-toggle-plus-minus-257426a1.svg
new file mode 100644
index 000000000..6830c1a27
--- /dev/null
+++ b/maintenance_page/html/assets/images/icon-toggle-plus-minus-257426a1.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/maintenance_page/html/index.html b/maintenance_page/html/index.html
new file mode 100644
index 000000000..5193ade71
--- /dev/null
+++ b/maintenance_page/html/index.html
@@ -0,0 +1,79 @@
+
+
+
+
+ This service is currently unavailable - Apply for qualified teacher status - GOV.UK
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This service is currently unavailable
+
We're sorry the service is not available right now.
+
Try again later.
+
If you reached this page after submitting information then it has not been saved. You will need to enter it again when the service is available.
+
+
+
+
+
+
+
diff --git a/maintenance_page/html/javascript/govuk-frontend-5.3.1.min.js b/maintenance_page/html/javascript/govuk-frontend-5.3.1.min.js
new file mode 100644
index 000000000..a2d459b47
--- /dev/null
+++ b/maintenance_page/html/javascript/govuk-frontend-5.3.1.min.js
@@ -0,0 +1 @@
+const version="5.3.1";function normaliseString(e,t){const s=e?e.trim():"";let n,i=null==t?void 0:t.type;switch(i||(["true","false"].includes(s)&&(i="boolean"),s.length>0&&isFinite(Number(s))&&(i="number")),i){case"boolean":n="true"===s;break;case"number":n=Number(s);break;default:n=e}return n}function mergeConfigs(...e){const t={};for(const s of e)for(const e of Object.keys(s)){const n=t[e],i=s[e];isObject(n)&&isObject(i)?t[e]=mergeConfigs(n,i):t[e]=i}return t}function extractConfigByNamespace(e,t,s){const n=e.schema.properties[s];if("object"!==(null==n?void 0:n.type))return;const i={[s]:{}};for(const[o,r]of Object.entries(t)){let e=i;const t=o.split(".");for(const[n,i]of t.entries())"object"==typeof e&&(n` from template `