B

bmde

Name Last Update
accounts Loading commit data...
closet Loading commit data...
fixtures Loading commit data...
iframe Loading commit data...
maps Loading commit data...
static Loading commit data...
templates Loading commit data...
www Loading commit data...
.gitignore Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
docker-compose.yml Loading commit data...
importer.py Loading commit data...
manage.py Loading commit data...
requirements.txt Loading commit data...

DeweyMaps

Installation:

  • Install postgresql and postgis
  • virtualenv (in python 3 - virtualenv --python=/usr/bin/python3 bmde-env)
  • pip install -r requirements.txt
  • createdb maps (as postgres user)
  • ./manage.py migrate

Installation serveur

  1. Mise à jour dépendances postgres

Voir https://www.postgresql.org/download/linux/ubuntu/

  1. Installation postgresql & postgis
$ sudo apt-get install postgresql-server-dev-9.5 postgresql-9.5-postgis-2.2

2.bis Installation dep pour pyscopg2

$ sudo apt-get install python3-dev gcc libpq-dev
  1. Installation de pip3 & virtualenv
$ wget https://bootstrap.pypa.io/get-pip.py #see https://pip.pypa.io/en/stable/installing/
$ python3 get-pip.py
$ pip install virtualenv
  1. Création de l'env virtuel
$ virtualenv --python=/usr/bin/python3 ve
  1. Création de la db maps
$ su - u postgres
postgres$ createuser bmde -W
postgres$ createdb -O bmde -E utf8 bmde
postgres$ psql -c "Create exetension postgis" -d bmde
  1. Installation des dépendances:
$ source ve/bin/activate
$ pip install -r requirements.txt
  1. Mettre à jour la config:
$ cp settings.py.dist settings.py
$ vi settings.py #editer db
$ ./manage.py migrate
  1. Configurer apache
$ apt-get install apache2 libapache2-mod-wsgi-py3

et éditer le fichier de conf:

<VirtualHost *:80>
    Alias /static /var/www/bmde/static
    <Directory /var/www/bmde/static>
        Require all granted
    </Directory>

    <Directory /var/www/bmde/www>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>

    WSGIDaemonProcess bmde python-home=/var/www/bmde/ve python-path=/var/www/bmde
    WSGIProcessGroup bmde
    WSGIScriptAlias / /var/www/bmde/www/wsgi.py
</VirtualHost>