# Show an error page when rebuild

**URL:** https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204
**Category:** Feature
**Created:** [19 juni 2015 om 11:24 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204 "2015-06-19T11:24:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![michael\_solomon](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@michael\_solomon](https://meta.discourse.org/u/michael_solomon)
#### Post date: [19 juni 2015 om 11:24 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204/1 "2015-06-19T11:24:56Z")

</div>

Hi,  
When I “./launcher rebuild app” my Discourse and try to enter to my Discourse forum, its shows “502 Bad Gateway” error.  
I know it’s just 10 minutes but I think it’s more professional to show to our users a pretty error message when we update our Discourse.  
Thanks you,  
Miki  
P.S: sorry for my lame english. working on it!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [19 juni 2015 om 23:17 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204/2 "2015-06-19T23:17:30Z")

</div>

Is this even possible on the standard Docker install @sam or @riking?

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [20 juni 2015 om 00:14 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204/3 "2015-06-20T00:14:38Z")

</div>

For things like this, we maintain a fully separate one-page website with the same valid SSL certs as our app/site.

When it’s time for maintenance, we point DNS at that server, do our thing, and point it back. Requires a short TTL to make it worthwhile, but that works for us.

I suppose something like that could be done in a separate docker setup on the same host?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [20 juni 2015 om 03:07 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204/5 "2015-06-20T03:07:18Z")

</div>

I suppose that the inner NGINX could have a 502 rule to serve a page like this:

```plaintext
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="5">
</head>
<body>
The Discourse server is starting up, please wait.....
</body>
</html>

```

Because if you can see that page at all, it means that the container is running and Unicorn is unreachable.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [20 juni 2015 om 03:14 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204/6 "2015-06-20T03:14:51Z")

</div>

Yes why don’t you submit that change. Good idea!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [20 juni 2015 om 03:56 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204/7 "2015-06-20T03:56:51Z")

</div>

Does not solve much, the issue is that the container must be stopped during rebuild of standalone

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [26 augustus 2015 om 13:57 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204/8 "2015-08-26T13:57:30Z")

</div>

In my use case, that _would_ help a lot: I use nginx running on the host since I serve multiple subdomains. This already shows a nice message while the container is down – but `bad gateway` still leaks through while the conainer starts up.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [26 augustus 2015 om 14:20 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204/9 "2015-08-26T14:20:32Z")

</div>

This is a band-aid at best.

If NGINX is serving a 502 at all then any customers using services such as Cloudflare will never see that error, they’ll see the 521 error from Cloudflare.

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [4 december 2025 om 11:36 UTC](https://meta.discourse.org/t/show-an-error-page-when-rebuild/30204/10 "2025-12-04T11:36:01Z")

</div>


