summaryrefslogtreecommitdiff
path: root/README.md
blob: 90311b95b3a464d44c2ce92c567cc2a5ee70375d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# GNU Taler Demo Bank

This code implements a bank Web portal that tightly integrates
with the GNU Taler payment system.  The bank it primarily meant
be used as part of a demonstrator for the Taler system, but
can also be used in standalone deployments for a regional/local
currency.

## Installation

### PyPI

To install the bank without building it from source, run
```
$ pip3 install --user talerbank
```
to get the latest version published in the Python Package Index (PyPI).


### Prerequisites

To build the bank, you need:
* ``python>=3.8``
* ``pip3``
* ``poetry``
  * Either install with ``pip3 install --user poetry``, your distribution's package manager,
  or as recommended in the [poetry documentation](https://python-poetry.org/docs/#installation).


### GNU-Style Installation

If you are building from the git repository, first run ``./boostrap``.

Then run
```
$ ./configure
$ make install
```
to install the bank for the current user.


### Custom Installation

To install with custom options, first build the wheel for the bank
and then install via ``pip3``:
```
$ ./configure
$ make wheel
$ pip3 $CUSTOM_OPTIONS ./dist/talerbank-$VERSION-py3-none-any.whl
```


## Internationalization

After new strings to translate enter the bank's text, run the
following command in order to expand the current PO files:

```
$ make i18n-strings
```

It is then required to put the extended PO files under versioning.

The following command creates *new* languages to be translated.  In
particular, it produces the PO file for the language being added.

```
$ python3 manage.py makemessages -l $LANG
```

However, you should probably use https://weblate.taler.net/ to add
new languages instead.


## Configuring the Bank

The bank obeys to the INI syntax for configuration files.
When launched, the bank will by default look for a configuration
file located at ~/.config/taler.conf.  To override this behaviour,
give the -c option when launching the bank.

The following configuration instance makes the bank serve over
HTTP, at port 5882.

```
[taler]
currency = LOCALKUDOS

[bank]
serve = http
http_port = 5882
database = postgres:///talerlocal
max_debt = LOCALKUDOS:500.0
max_debt_bank = LOCALKUDOS:1000000000.0
allow_registrations = YES
base_url = http://localhost:5882/
suggested_exchange = http://localhost:5884/
```


## Launching the Bank

```
$ taler-bank-manage serve
```

## Running Tests

From the repository's top directory:

$ make check


## How to Force Migrations

https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html