summaryrefslogtreecommitdiff
path: root/README.md
blob: 1f115895ffee7c3092b560088c152786ba7085bd (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Taler Merchant Demos Setup

_Warning: This page is not completed yet. Follow the instructions at your own risk_

## Installing the dependencies

### Automatically

The [Makefile](./Makefile) contains premade scripts for some distros;

```bash
# Arch-based (Manjaro, Arco, etc...)
$ make setup-arch

# Debian-based (Ubuntu, Mint, etc...)
$ make setup-deb
```

### Manually

<!--
  TODO: Migrate to per-distro instructions
  -> We need to consider if we should incrase the README.md's size, or if we should split said per-distro instructions into multiple files
-->

_Note: These instructions assume you are on a debian-based distribution. Other distributions may vary!_

1. Update Apt Repositories (Recommended);
   > ```bash
   > $ sudo apt update
   > ```
2. Step 2: Ensure Python 3.5 or above and Flask with the Babel extension are installed;
   > ```bash
   > $ sudo apt install python3 python-is-python3 python3-flask-babel -y
   > ```
3. Ensure Python3 Pip is installed;
   > ```bash
   > # you may need to use python3-pip on some systems
   > $ sudo apt install python3-pip -y
   > ```
4. Configure things using:
   > ```bash
   > $ ./configure --destination=local
   > ```
5. Install UWSGI
   > ```bash
   > $ pip install uwsgi # You may need to use pip3 on some systems
   > ```
6. Install LXML
   > ```bash
   > $ pip install lxml # You may need to use pip3 on some systems
   > ```
7. Install NodeJS <!-- NOTE: Likely redundant, legacy -->
   > ```bash
   > $ sudo apt install npm nodejs
   > ```
8. Install Poetry
   > ```bash
   > $ pip install poetry
   > ```

## Configuring the demo

_This is just how I did it, and not necessarily the optimal method. You should only use this in testing._

Step 1: Open the config:

> `$ editor ~/.config/taler.conf`

<br>

Step 2: Adding the required configuration values:

> ```
> [frontends]
> backend_apikey = "secret-token:secret"
> backend = https://backend.demo.taler.net/
>
> [taler]
> currency = KUDOS
>
> [blog]
> http_port = 8080
> serve = http
> ```

<br>

Step 3: Configure the config:

> 1. Replace the backend api key with the api key for the backend<br>
> 2. Replace the backend URL with the actual backend link<br>
> 3. Replace the http port with whichever port you desire<br>
> 4. _In Production:_ Replace the currency with your currency

<br>

## Applying Changes

To apply changes, use

> `$ make install`

## Running the program

To start the server, use the following command:<br>

> `$ taler-merchant-demos blog`

_Note: If zsh asks you if you want to correct it to talermerchantdemos, select **no**_

## More configuration options.

This makes the blog speak UWSGI over TCP:

> ```
> [frontends]
> backend_apikey = "secret-token:secret"
> backend = https://backend.demo.taler.net/
>
> [taler]
> currency = KUDOS
>
> [blog]
> serve = uwsgi
> uwsgi_serve = tcp
> uwsgi_port = XZY
> ```

<br>

This makes the blog speak UWSGI over unix domain socket:

> ```
> [frontends]
> backend_apikey = "secret-token:secret"
> backend = https://backend.demo.taler.net/
>
> [taler]
> currency = KUDOS
>
> [blog]
> serve = uwsgi
> uwsgi_serve = unix
> uwsgi_unixpath = "/tmp/blog.uwsgi"
> uwsgi_unixpath_mode = XZY
> ```

## Notice: Bank

The bank lives in [merchant-backoffice.git](https://git.taler.net/merchant-backoffice.git) under [/packages/bank](https://git.taler.net/merchant-backoffice.git/tree/packages/bank)