# Restarting container when internet is down causes discourse to fail

**URL:** <https://meta.discourse.org/t/restarting-container-when-internet-is-down-causes-discourse-to-fail/42615>\
**Category:** Bug\
**Created:** [15.Апрель.2016 15:29:13 UTC](https://meta.discourse.org/t/restarting-container-when-internet-is-down-causes-discourse-to-fail/42615 "2016-04-15T15:29:13Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![carbo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/carbo/32/54170_2.png) [@carbo](https://meta.discourse.org/u/carbo)\
**Post date:** [15.Апрель.2016 15:29:13 UTC](https://meta.discourse.org/t/restarting-container-when-internet-is-down-causes-discourse-to-fail/42615/1 "2016-04-15T15:29:13Z")

</div>

It seems that if you have an intranet discourse site, even though it might have internet access, will no longer work if two factors come into play:

1. Your internet access is down (for whatever reason)
2. You decide to restart your discourse container during the same period.

Steps to reproduce.

1. Make a local Discourse install and configure it so that is properly setup
2. Unplug your network from the internet
3. Restart your Discourse container `./launcher stop app` then `./launcher start app`
4. Try to access the local Discourse site

After further checking.

The problem is caused by the nginx service not being able to find the host [avatars.discourse.org](http://avatars.discourse.org) found at line 220 of the discourse.conf file if the server has no internet access when trying to start. Once the internet connection is re-established nginx will start up. For that period of time your Discourse site will remain unusable. A workaround is to set line 220 of discourse.conf to:

`proxy_pass https://localhost/;`

---

_[View the full topic](https://meta.discourse.org/t/restarting-container-when-internet-is-down-causes-discourse-to-fail/42615)._
