GithubHelp home page GithubHelp logo

sitn / infolica Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 5.0 6.75 MB

Programme de gestion des affaires de la mensuration officielle du Canton de Neuchâtel

License: MIT License

Python 40.14% Mako 0.22% CSS 1.60% JavaScript 0.92% HTML 31.42% Vue 25.64% Dockerfile 0.07%

infolica's Introduction

infolica

Infolica est une application destinées à gérer le livre du cadastre du canton de Neuchâtel.

Requirements

  • A running database with PostGIS extension.
  • Python

Deploy

Everytime production is deployed, prepub should be deployed before. Instructions hereafter are for prepub instance but you have to do the same for production before.

Prepare prepub configuration:

cp back/prepub.ini.template back/prepub.ini
cp env.sample env.prepub

Adapt prepub.ini and env.prepub according to your environnement. Then:

python deploy prepub

Logs can be accessed with:

docker-compose logs --tail=200 -f

By default, docker-compose will be executed to the remote you've just deployed.

You can also use npm run serve to test your client, which will reload on the fly after your modifications on the front.

npm run serve

Database

⚠️ Infolica is based on PG Database and depends on some geographical components. Make sure to add the postgis and pg_trgm extensions to your database schema.

Apache

When developping and to avoid getting cross-origin issues with the application cookie, one should proxy the whole application through Apache.

To do so, you need Apache installed on your computer and add the following configuration:

<location /infolica_api>
    Require all granted
</location>
<location /infolica/>
    Require all granted
</location>

SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
ProxyPass "/infolica_api/" "http://localhost:6543/"
ProxyPassReverse "/infolica_api/"  "http://localhost:6543/"
ProxyPass "/infolica/" "http://localhost:8080/infolica/"
ProxyPassReverse "/infolica/"  "http://localhost:8080/infolica/"

ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
ProxyRequests Off

Then in your local .env.development.local file:

VUE_APP_API_URL = "http://localhost/infolica_api/infolica/api"

Install and configure Apache

If you already have an Apache with mod_wsgi enabled, switch to Apache configuration step.

You'll need to have an Apache 32bits if your python is 32bits or Apache 64bits if your python is 64bits. Download a pre-compiled wheel of mod_wsgi for python: https://www.lfd.uci.edu/~gohlke/pythonlibs/ in the root folder of your project. Make sure to choose the right version.

  1. Install the wheel with pip install. Make sure you have Microsoft Visual C++ installed on your machine. For an Apache 2.4, 64bits with Python 3.7 and Microsoft Visual C++ 15, download file mod_wsgi‑4.7.1+ap24vc15‑cp37‑cp37m‑win_amd64.whl on (https://www.lfd.uci.edu/~gohlke/pythonlibs/)[https://www.lfd.uci.edu/~gohlke/pythonlibs/
pip install .\mod_wsgi-4.6.4+ap24vc15-cp37-cp37m-win_amd64.whl
mod_wsgi-express module-config
  1. You'll have an output showing the path of the generated wsgi module. Copy the module to your Apache modules folder (replace c:\Apache with your installation folder) and rename it with .so extension:
cp .\env\Lib\site-packages\mod_wsgi\server\mod_*.pyd C:\Apache24\modules\mod_wsgi.so
  1. In the conf\httpd.conf file of your Apache installation directory, add this line to enable mod_wsgi:
LoadModule wsgi_module modules/mod_wsgi.so

Apache configuration

  1. Rename the apache/wsgi.conf.sample file to wsgi.conf and adapt the paths according to your setup.

  2. Finally, make your apache aware of your app by adding to the end of your httpd.conf file:

Include path\to\your\project\apache\*.conf
  1. Restart apache

infolica's People

Contributors

chokri-koussa avatar dependabot[bot] avatar kalbermattenm avatar maltaesousa avatar rufener avatar

Watchers

 avatar  avatar  avatar  avatar

infolica's Issues

Modification de client.

Le client modifié est archivé et les modifications entrainent la création d'une nouvelle entrée dans la BD. Le lien entre l'ancien et le nouveau client est stocké dans la bd.
Ajouter date de sortie à l'ancien , créer nouveau avec date d'entrée

WS - Ajouter une table ClientType

classClientType(Base):
tablename = 'client_type'
table_args = {'schema': 'infolica'}
id = Column(BigInteger, primary_key=True)
nom = Column(Text, nullable=False)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.