<div dir="ltr"><div>Dear Francesco and Alessio,</div><div><br></div><div>Thank you very much for your reply. I removed geonode directory and I cloned a new geonode.git. Now I have brand new Docker GeoNode running.</div><div><br></div><div>My goal is to configure settings.py and local_settings.py as follow:</div><div><br></div><div>1 - Set SITE_HOST and SITE_HOST_PORT<br></div><div><br></div><div>1 - Set ALLOWED_HOST and PROXY_ALLOWED_HOST</div><div><br></div><div>2 - Set ACCOUNT E-MAILS</div><div><br></div><div>In order to achieve my goal, I did the following:</div><div><br></div><div>1 - # I stopped all containers</div><div><br></div><div>$ docker stop nginx4geonode django4geonode geoserver4geonode celery4geonode db4geonode rabbitmq4geonode</div><div><br></div><div>2 - # I made a copy of local_settings.py.geoserver.sample as local_settings.py and a copy of settings.py as settings.py.copy</div><div><br></div><div><br></div><div>3 - Before running <docker-compose up -d>, I changed django.env setting  GEONODE_LB_HOST_IP=198.162.0.2 and GEONODE_LB_PORT=80</div><div><br></div><div>The site is responding in <a href="http://198.162.0.2">http://198.162.0.2</a>. I think SITE_HOST and SITE_HOST_PORT configuration is achieved.</div><div><br></div><div>4 - Changing settings.py <br></div><div><br></div><div>4.1 - Changing PROXY_ALLOWED_HOSTS<br></div><div><br></div><div>I added the IP 198.162.0.2  to PROXY_ALLOWED_HOSTS = ['localhost', 'django', 'geonode', '192.168.0.2' ], but django.env also has PROXY_ALLOWED_HOST and changed it ALLOWED_HOSTS = ['localhost', 'django', 'geonode', '192.168.0.2' ]<br></div><div><br></div><div>I got confused here. Should I add the IP only into django.env or should I add it to settings.py too? Or should I add it only to seetings.py?</div><div><br></div><div>4.2 settings.py  EMAIL CONFIG</div><div><br></div><div># Define email service on GeoNode<br>EMAIL_ENABLE = strtobool(os.getenv('EMAIL_ENABLE', 'True'))<br><br>if EMAIL_ENABLE:<br>    EMAIL_BACKEND = os.getenv('DJANGO_EMAIL_BACKEND',<br>                              default='django.core.mail.backends.smtp.EmailBackend')<br>    EMAIL_HOST = '<a href="http://smtp.sipa.edu">smtp.sipa.edu</a>'<br>    EMAIL_PORT = 587<br>    EMAIL_HOST_USER = 'osgeo.geonode'<br>    EMAIL_HOST_PASSWORD = 'passwd<br>    EMAIL_USE_TLS = True<br>    DEFAULT_FROM_EMAIL = '<a href="mailto:osgeo.geonode@sipa.edu">osgeo.geonode@sipa.edu</a>'<br>else:<br>    EMAIL_BACKEND = os.getenv('DJANGO_EMAIL_BACKEND',<br>                              default='django.core.mail.backends.console.EmailBackend')</div><div><br></div><div><br></div><div><br></div><div>ACCOUNT_OPEN_SIGNUP = True<br>ACCOUNT_APPROVAL_REQUIRED = strtobool(<br>    os.getenv('ACCOUNT_APPROVAL_REQUIRED', 'True')<br>)<br>ACCOUNT_ADAPTER = 'geonode.people.adapters.LocalAccountAdapter'<br>ACCOUNT_CONFIRM_EMAIL_ON_GET = True<br>ACCOUNT_EMAIL_REQUIRED = True<br>ACCOUNT_EMAIL_VERIFICATION = True<br>ACCOUNT_EMAIL_CONFIRMATION_EMAIL = True<br>ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = True<br><br></div><div><br></div><div><br></div><div><div>4.3 settings.py  SITEURL CONFIG</div><div><br></div><div></div><div>I got confused in here. As I mentioned in item 3, django.env is set as GEONODE_LB_HOST_IP=198.162.0.2 and GEONODE_LB_PORT=80. Though SITEURL = os.getenv('SITEURL', "<a href="http://localhost:8000/">http://localhost:8000/</a>") in the seetings.py, do I still have to change it to <a href="http://198.162.0.2">http://198.162.0.2</a>? <br></div><div><br></div><div><br></div><br></div><div>5 - Changing local_settings.py <br></div><div><br></div><div>5.1 - SITEURL CONFIG</div><div><br></div><div>I got confused in here. SITEURL is set as SITEURL = "<a href="http://localhost/">http://localhost/</a>" in local_settings, but I set GEONODE_LB_HOST_IP=198.162.0.2 and GEONODE_LB_PORT=80 in django.env. Do I still have to change SITEURL to  SITEURL = "<a href="http://198.162.0.2/">http://198.162.0.2/</a>" in local_settings? Does it make sense to have the local_settings.py? Or should I use only settings.py? There was not local_settings.py.sample as used to be for Python virtualenv setup, but I copied local_settings.py.geoserver.sample as local_settings.py.</div><div><br></div><div>5.2 ALLOWED_HOSTS</div><div><br></div><div>I set ALLOWED_HOSTS = [HOSTNAME, 'localhost', '198.162.0.2']. The file django.env does no have settings to ALLOWED_HOSTS, therefore, I think I have to keep it in local_settings. Am I right?</div><div><br></div><div>Could you please give me some insights for the points I got confused?</div><div><br></div><div>I appreciated your time in advance</div><div><br></div><div>Kind Regards</div><div><br></div><div>Julierme<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 30, 2018 at 5:16 AM, francesco bartoli <span dir="ltr"><<a href="mailto:xbartolone@gmail.com" target="_blank">xbartolone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can you kindly describe a little bit what your are trying to do and also share the docker-compose file that it is supposed to run?</div><br><div class="gmail_quote"><span class=""><div dir="ltr">Il giorno ven 27 lug 2018 alle ore 19:30 Julierme Pinheiro <<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@<wbr>gmail.com</a>> ha scritto:<br></div></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Dear GeoNode Users,</div><div><br></div><div>I am stopping/Starting  the containers nginx4geonode and geoserver4geonode  to make changes in the settings and local_settings.py in ~/geoode/geonode/*.</div><div><br></div><div>Everything was working fine, but now I am facing a issue:</div><div><br></div><div>django4geonode container won't start-up. <docker ps> always return:</div><div><br></div><div>STATUS Up 5 seconds and most of the time STATUS Restarting (1) 31 seconds ago.  It is taking hours and django4geonode does not start.</div><div><br></div><div>Sorry for my lack of knowledge on using docker, but my attempt was to stop and start the container, and it never gets started. <br></div><div><br></div><div>Even with the restarting process, the response in the browser is <b>502 Bad Gateway</b> / nginx/<a href="http://1.15.0." target="_blank">1.15.0.</a></div><div><br></div><div>Does anyone have face something similar and could give me a hint on this issue?</div><div><br></div><div>nginx4geonode and geoserver4geonode starts, only django4geonode won't start-up.</div><div><br></div><div>Thank you very much for your time in advance.</div><div><br></div><div>I appreciated your help</div><div><br></div><div>Kind regards</div><div><br></div><div>Julierme<br></div><div><br></div><div><br></div><div><br><h1><br></h1>  <br></div><div><br></div><div><br></div></div></div></div><span class="">
______________________________<wbr>_________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/geonode-users</a><br>
</span></blockquote></div>
</blockquote></div><br></div>