Skip to content
Snippets Groups Projects
Commit 82d7d96d authored by Alexander Kaschta's avatar Alexander Kaschta Committed by Janis Streib
Browse files

UPD: Improvements to the documentation

parent 1168c366
No related branches found
No related tags found
No related merge requests found
# NETVS - Middleware
## Installation
The NET-SUITE middleware requires ```python3```.
In case you don't want a venv setup, omit steps 1&2.
1. Create venv:
```shell
virtualenv venv/
```
2. Change into venv:
```shell
source bin/activate
```
3. Install dependencies:
```shell
pip install -r requirements.txt
```
## Productive setup with uwsgi
```shell
uwsgi -s /tmp/net-suite.sock --virtualenv <path to env> --manage-script-name --mount /net-suite=run:app
```
## DEV-Setup
```DEBUG = True``` in ```config.py```.
```shell
python3 run.py
```
## systemd
Also take at look at the [uwsgi documentation](http://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd).
## Configuration
### NET-DB
#### Postgres
Net-Suite uses different databases depending on the host operation mode defined in ```/usr/local/etc/host_oper_mode_data.cfg```:
```INI
[op_environment]
mode = test
# mode = prod
# mode = test
[redundancy]
mode = active
[default_database_connection]
prod = pgsql_prod
test = pgsql_test
devel = psql_devel
```
The different databases are defined in the ```HOME``` of the user running DNSVS in the file ``` ~/.db_connection_data.ini```:
```INI
[pgsql_prod]
host=prodhost
port=5435
user=user
db=db
[pgsql_test]
host=testhost
port=5435
user=user
db=db
[pgsql_devel]
host=develhost
port=5435
user=user
db=db
```
Postgres' authentication information is retrieved from ```~/.pgpass```.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment