Skip to main content

Down for Maintenance

Our nextjs jobs can show a down for maintenance page: either for everything using DOWN_FOR_MAINTENANCE, or for the website only (API keeps running) using WEBSITE_DOWN_FOR_MAINTENANCE.

Bring Synthetic down for maintenance (website and API)​

When the DOWN_FOR_MAINTENANCE envvar is set to "true", our nextjs jobs will show a down for maintenance page.

Down for Maintenance page

To avoid long build and deploy workflows, use the following kubectl patch command to edit the prod environment variable on the fly.

caution

Always use caution when editing production state directly.

Set DOWN_FOR_MAINTENANCE=true for prod-glhf-nextjs​

kubectl patch deployment prod-glhf-nextjs -p '{"spec":{"template":{"spec":{"containers":[{"name":"glhf-nextjs","env":[{"name":"DOWN_FOR_MAINTENANCE","value":"true"}]}]}}}}'

Set DOWN_FOR_MAINTENANCE=false for prod-glhf-nextjs​

kubectl patch deployment prod-glhf-nextjs -p '{"spec":{"template":{"spec":{"containers":[{"name":"glhf-nextjs","env":[{"name":"DOWN_FOR_MAINTENANCE","value":"false"}]}]}}}}'

Website-only maintenance​

When the WEBSITE_DOWN_FOR_MAINTENANCE envvar is set to "true", our nextjs jobs will show a down for maintenance page for all website requests while the API keeps running.

Stays up: all API requests (/api/* and the api subdomains, including /api/v1/health). The queue worker is unaffected and keeps processing jobs.

Set WEBSITE_DOWN_FOR_MAINTENANCE=true for prod-glhf-nextjs​

kubectl patch deployment prod-glhf-nextjs -p '{"spec":{"template":{"spec":{"containers":[{"name":"glhf-nextjs","env":[{"name":"WEBSITE_DOWN_FOR_MAINTENANCE","value":"true"}]}]}}}}'

Set WEBSITE_DOWN_FOR_MAINTENANCE=false for prod-glhf-nextjs​

kubectl patch deployment prod-glhf-nextjs -p '{"spec":{"template":{"spec":{"containers":[{"name":"glhf-nextjs","env":[{"name":"WEBSITE_DOWN_FOR_MAINTENANCE","value":"false"}]}]}}}}'