Skip to content

Instantly share code, notes, and snippets.

@Envek
Created February 13, 2019 19:33
Show Gist options
  • Save Envek/e1aefede31c30d8a6ebb3cbbd1393403 to your computer and use it in GitHub Desktop.
Save Envek/e1aefede31c30d8a6ebb3cbbd1393403 to your computer and use it in GitHub Desktop.
Minimal image to be used as Kubernetes default backend as maintenance page
server {
listen 80;
server_name localhost;
charset utf-8;
location / {
return 503;
error_page 503 /maintenance.html;
}
location = /maintenance.html {
add_header Retry-After 600 always;
root /usr/share/nginx/html;
}
}
FROM nginx:stable-alpine
COPY default.conf /etc/nginx/conf.d/default.conf
COPY maintenance.html /usr/share/nginx/html/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>We're under maintenance</title>
</head>
<body>
<h1>Maintenance 🛠️</h1>
<p>Application is under planned maintenance now. Please stand by. We should get back in couple of minutes.</p>
<hr>
<h1>Техобслуживание 🛠️</h1>
<p>Приложение сейчас находится на техобслуживании. Пожалуйста, ожидайте. Всё вернётся в строй в течении нескольких минут.</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment