Update .service and README.debian for new postgresql DB
Sophie Brun
5 years ago
0 | 0 |
From Faraday version 2.0.0, Faraday is composed of Faraday Server and Faraday Client.
|
1 | 1 |
Since version 3.0 couchdb has been replaced by PostgreSQL
|
2 | 2 |
|
|
3 |
The new PostgreSQL database is created when python-faraday is run for the
|
|
4 |
first time, with a default user:
|
|
5 |
- username: faraday
|
|
6 |
- password: automatically generated, it can be found in the config file
|
|
7 |
~/.faraday/config/user.xml (field api_user)
|
3 | 8 |
|
|
9 |
For an update from version 2.* to version 3.*
|
|
10 |
You can import your old couchDB database:
|
|
11 |
- run "python-faraday" a first time (to create new DB)
|
|
12 |
- run "systemctl start couchdb" (install package couchdb if missing)
|
|
13 |
- "cd /usr/share/python-faraday"
|
|
14 |
- "python manage.py import_from_couchdb"
|
|
15 |
|
|
16 |
More information here:
|
|
17 |
https://github.com/infobyte/faraday/wiki/Installation-Community
|
|
0 |
Remove couchdb and erlang17 after january 2019.
|
|
1 |
They are no longer required by any package. We just keep them for a few
|
|
2 |
months to make the DB import easier in Faraday.
|
|
3 |
|
0 | 0 |
[Unit]
|
1 | 1 |
Description=python-faraday Server
|
2 | |
Requires=couchdb.service
|
3 | |
After=couchdb.service
|
|
2 |
Requires=postgresql.service
|
|
3 |
After=postgresql.service
|
4 | 4 |
|
5 | 5 |
[Service]
|
6 | 6 |
Type=simple
|
|
7 |
ExecStartPre=/bin/sh -c 'if ! su postgres -c "psql -lqt" | cut -d \| -f 1 | grep -qw faraday; then cd /usr/share/python-faraday && python manage.py initdb; fi'
|
7 | 8 |
ExecStart=/usr/share/python-faraday/faraday-server.py
|
8 | 9 |
|
9 | 10 |
[Install]
|