summaryrefslogtreecommitdiff
path: root/README.md
blob: c9f3e7fab2b6d84ee5c095d804b1f02791a70d46 (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
# Taler Merchant Demos Setup
*Warning: This page is not completed yet. Follow the instructions at your own risk*
## Installing the dependencies
*Step 0 (Optional - Reccomended): Update Apt Repositories*
> ```$ sudo apt update```

<br/>
Step 1: `cd` into the directory:<br/>

> ```$ cd taler-merchant-demos```

<br/>
Step 2: Ensure Python 3.5 or above and Flask with the Babel extension are installed using a command like:<br/>

> ```$ sudo apt install python3.8 python3-flask-babel -y```

<br/>
Step 3: Ensure Python3 Pip is installed:<br/>

> ```$ sudo apt install python3-pip -y```

<br/>
Step 4: configure this package using:<br/>

> ```$ ./configure --destination=local```

Step 5: Install UWSGI<br>
*NOTE: DO NOT INSTALL USING PIP2 (on my system, that is what the pip command uses) - INSTALL IT USING PIP3*

> ```$ pip3 install uwsgi```

<br/>
Step 6: Install LXML
*NOTE: DO NOT INSTALL USING PIP2 (on my system, that is what the pip command uses) - INSTALL IT USING PIP3*<br>

> ```$ pip3 install lxml```

<br/>

Step 7: Install NPM<br>

> ```$ sudo apt install npm; sudo npm install -g npm node```

<br>

Step 8: Install scss<br>
> ```$ make sass-install```

This will the NPM implementation of sass. If you have a Ruby
tool called 'sass' installed, this build will NOT work.


## Quick Install for the dependencies
Here's one command to automatically install all dependencies at once:
> ```$ sudo apt install python3.8 python3-pip npm -y; pip3 install lxml uwsgi; ./configure --destination=local; sudo npm install -g npm node;make sass-install```

## Configuring the demo
*This is just how I did it, and not the main method of doing it*

Step 1: Open the config:

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

Step 2: Adding the required keys:
> Copy & Paste the following into the file:

> ```
> [frontends]
> backend_apikey = "ApiKey Sandbox"
> backend = https://backend.test.taler.net/
>
> [taler]
> currency = TESTKUDOS
>
> [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 the port<br>
> 4. (Optional: Replace the currency with your currency)
<br>

## Applying Changes
To apply changes, use
> ```$ make install```

<br>

To apply ***SCSS*** changes, use
> ```$ make scss-build```

## Running the program
To start the server, use the following command:<br>
> ```$ taler-merchant-demos blog```

## More configuration options.
This makes the blog speak UWSGI over TCP:
> ```
> [frontends]
> backend_apikey = "ApiKey Sandbox"
> backend = https://backend.test.taler.net/
>
> [taler]
> currency = TESTKUDOS
>
> [blog]
> serve = uwsgi
> uwsgi_serve = tcp
> uwsgi_port = XZY

> ```
<br>

This makes the blog speak UWSGI over unix domain socket:
> ```
> [frontends]
> backend_apikey = "ApiKey Sandbox"
> backend = https://backend.test.taler.net/
>
> [taler]
> currency = TESTKUDOS
>
> [blog]
> serve = uwsgi
> uwsgi_serve = unix
> uwsgi_unixpath = "/tmp/blog.uwsgi"
> uwsgi_unixpath_mode = XZY
> ```