Created
February 13, 2019 19:33
-
-
Save Envek/e1aefede31c30d8a6ebb3cbbd1393403 to your computer and use it in GitHub Desktop.
Minimal image to be used as Kubernetes default backend as maintenance page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:stable-alpine | |
COPY default.conf /etc/nginx/conf.d/default.conf | |
COPY maintenance.html /usr/share/nginx/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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