Repository: GeotrekCE/Geotrek-admin

Issue:
Installation issue
Hello,
I'm trying to install Geotrek following the documentation, and I have some problems.

At the very beginnig, when I run the install.sh, the script can't find the `etc/setting.ini` file. I checked, and I have no `'etc'` folder at all... So the install aborted. 
I tried to create myself this folder and the `settings.ini` file with the variable expected (dbhost, dbname etc...). It works (the database is installed), but the install crash few step later when it try to install the python environnement. `Could not setup python environment !`

Did I miss something in the installation documentation ?
How can I fix this problem ?

Thanks for your help


Discussion:
Which version are you using ? 
The latest stable version (2.11.3) or the master ? 
There has been some important improvment to the installation script recently (https://github.com/GeotrekCE/Geotrek-admin/pull/1617) but I didnt tested them as they are in master but not in a new stable version. 
Last version I installed on a new server is 2.11.2 and I didnt got any troubles.
I run `curl https://raw.githubusercontent.com/makinacorpus/Geotrek/master/install.sh > install.sh ` .. so yes I use the master.
I try with the 2.11.2, thank you 


Yes, didnt tested the master yet. 
And for installation, this is not the way I do : 

Log in with your linux user (not root)

- cd /home/myusername
- wget https://github.com/GeotrekCE/Geotrek-admin/archive/2.11.2.zip (number to replace with the  latest stable version : https://github.com/GeotrekCE/Geotrekadmin/releases)
- sudo apt-get install unzip
- unzip 2.11.2.zip
- cd Geotrek-admin-2.11.2/
- ./install.sh

Fullfil the settings.ini file (automatically opened during installation process) with your configuration.


It works fine with the 2.11.2, thank you.

OK so it certainly means that there is an installation problem with actual `master` version, certainly due to evolutions in https://github.com/GeotrekCE/Geotrek-admin/pull/1617

I will also update the installation documentation to clarify to use the latest version rather than the master. 

Thanks.
Actually the install went to the end without showing any error, but I still can't access to the application.
When I go to my serveur URL I got a 502 bad gateway error.
I check the nginx log: 

` *1 connect() to unix:/tmp/gunicorn-geotrek.sock failed (2: No such file or directory) while connecting to upstream`
Ok I found the solution:
In the install.log, there is this problem:
```
sudo supervisorctl reload
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 228
```
So i did
`sudo supervisord -c /etc/supervisor/supervisord.conf`
`sudo supervisorctl -c /etc/supervisor/supervisord.conf`
`sudo supervisorctl reload`

It's now working fine.

Note: I'm working on ubuntu 16.04


OK thanks for the feedback. I've done a PR to clarify the installation doc : https://github.com/GeotrekCE/Geotrek-admin/pull/1629/files

For other points, I guess there are some points to check in the master installation scripts before releasing a new version.

Thanks.
@gutard does 2.11.4 and 2.11.5 fixed this installation issue ?

Resolving patch:
diff --git a/geotrek/zoning/factories.py b/geotrek/zoning/factories.py
--- a/geotrek/zoning/factories.py
+++ b/geotrek/zoning/factories.py
@@ -11,10 +11,13 @@
 from . import models
 
 
+# Don't intersect with geom from PathFactory
+SPATIAL_EXTENT = (200000, 300000, 1100000, 1200000)
+
 # Create 16 cities and 4 districts distinct same-area zone covering the spatial_extent and cycle on it
-geom_city_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=4, by_y=4, cycle=True)
-geom_district_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
-geom_area_iter = bbox_split_srid_2154(settings.SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
+geom_city_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=4, by_y=4, cycle=True)
+geom_district_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
+geom_area_iter = bbox_split_srid_2154(SPATIAL_EXTENT, by_x=2, by_y=2, cycle=True)
 
 
 class CityFactory(factory.DjangoModelFactory):


Test patch: