liquid_feedback_frontend

view INSTALL.mkd @ 1668:6d75df24e66e

Updated German translation
author bsw
date Sun Mar 07 09:52:36 2021 +0100 (2021-03-07)
parents fa9e93235e02
children a92e5df8905c
line source
1 LiquidFeedback Installation Instructions
2 ========================================
4 This document gives a short outline about the necessary steps to setup a
5 LiquidFeedback system.
8 1. Install necessary dependencies
9 ---------------------------------
11 If you're using a Debian system, make sure that the following packages are
12 installed:
14 * build-essential
15 * postgresql
16 * postgresql-server-dev-12
17 * libbsd-dev
18 * lua5.3
19 * liblua5.3-dev
20 * mercurial
21 * bmake
22 * lsb-release
23 * imagemagick
25 If you're using any other Linux distribution or BSD system, install the
26 necessary software components accordingly.
29 2. Ensure that the user account of your webserver has access to the database
30 ----------------------------------------------------------------------------
32 The useraccount of Moonbridge server process needs to have access to your
33 PostgreSQL installation. This is done by executing PostgreSQL's shell command
34 `createuser` as database superuser (usually `pgsql`, or `postgres` for
35 Debian installations):
37 su - postgres -s $SHELL
38 createuser --no-superuser --createdb --no-createrole www-data
39 exit
42 3. Install and configure LiquidFeedback-Core
43 --------------------------------------------
45 We recommend to create the database with the same user as your webserver
46 (usually `www-data`) to avoid having to setup database privileges.
48 The example below installs the database as `www-data` and stores the three
49 executables `lf_update`, `lf_update_issue_order` and
50 `lf_update_suggestion_order` in the directory `/opt/liquid_feedback_core/`:
52 # Download and unpack LiquidFeedback-Core
53 # from http://www.public-software-group.org/pub/projects/liquid_feedback/backend/
54 make
55 mkdir /opt/liquid_feedback_core
56 cp core.sql lf_update lf_update_issue_order lf_update_suggestion_order /opt/liquid_feedback_core
57 su www-data -s $SHELL
58 cd /opt/liquid_feedback_core
59 createdb liquid_feedback
60 psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback
62 A simple configuration may look as follows:
64 psql liquid_feedback
66 INSERT INTO system_setting (member_ttl) VALUES ('1 year');
67 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 hour', 20, 6);
68 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 day', 80, 12);
69 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 hour', 200, 60);
70 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 day', 800, 120);
72 Create an invite code for an admin user:
74 INSERT INTO member (invite_code, admin) VALUES ('sesam', true);
76 Exit the `psql` interface by typing:
78 \q
80 And don't forget to quit the `www-data` shell:
82 exit
85 4. Install Moonbridge
86 ---------------------
88 # Download and unpack Moonbridge
89 # from http://www.public-software-group.org/pub/projects/moonbridge/
90 pmake MOONBR_LUA_PATH=/opt/moonbridge/?.lua
91 mkdir /opt/moonbridge
92 cp moonbridge /opt/moonbridge/
93 cp moonbridge_http.lua /opt/moonbridge/
96 5. Install WebMCP
97 -----------------
99 # Download and unpack WebMCP
100 # from http://www.public-software-group.org/pub/projects/webmcp/
101 make
102 mkdir /opt/webmcp
103 cp -RL framework/* /opt/webmcp/
106 6. Install the LiquidFeedback-Frontend
107 --------------------------------------
109 Unpack source tree into appropriate directory, e.g. `/opt/liquid_feedback_frontend`:
111 # Download LiquidFeedback-Frontend
112 # from http://www.public-software-group.org/pub/projects/liquid_feedback/frontend/
113 mv liquid_feedback_frontend-vX.X.X /opt/liquid_feedback_frontend
115 Make `tmp/` directory of LiquidFeedback-Frontend writable for webserver:
117 chown www-data /opt/liquid_feedback_frontend/tmp
120 7. Configure mail system
121 ------------------------
123 It may be necessary to configure your server's mail system.
126 8. Configure the LiquidFeedback-Frontend
127 ----------------------------------------
129 cd /opt/liquid_feedback_frontend/config
130 cp example.lua myconfig.lua
131 # edit myconfig.lua according to your needs
134 9. Setup regular execution of `lf_update` and related commands
135 --------------------------------------------------------------
137 The executables `lf_update`, `lf_update_issue_order`, and
138 `lf_update_suggestion_order` must be executed regularly. This may be achieved
139 by creating a file named `/opt/liquid_feedback_core/lf_update.sh` with the
140 following contents:
142 #!/bin/sh
144 while true; do
145 nice /opt/liquid_feedback_core/lf_update dbname=liquid_feedback 2>&1 | logger -t "lf_core"
146 nice /opt/liquid_feedback_core/lf_update_issue_order dbname=liquid_feedback 2>&1 | logger -t "lf_core"
147 nice /opt/liquid_feedback_core/lf_update_suggestion_order dbname=liquid_feedback 2>&1 | logger -t "lf_core"
148 sleep 5
149 done
151 This file must be marked as executable:
153 chmod +x /opt/liquid_feedback_core/lf_updated
155 And this file should be started automatically at system boot. On systems with
156 systemd, create a file named `/etc/systemd/system/liquid_feedback_core.service`:
158 [Unit]
159 Description=LiquidFeedback Core update
161 [Service]
162 User=www-data
163 ExecStart=/opt/liquid_feedback_core/lf_update.sh
165 [Install]
166 WantedBy=multi-user.target
168 Enable and start the service:
169 systemctl start liquid_feedback_core
170 systemctl enable liquid_feedback_core
173 10. Start the frontend
174 ----------------------
176 After `lf_update` has been executed at least once, you should be able to use
177 your LiquidFeedback system.
179 Create a file named "/opt/liquid_feedback_frontend/run.sh":
181 #/bin/bash
183 /opt/moonbridge/moonbridge /opt/webmcp/bin/mcp.lua /opt/webmcp/ /opt/liquid_feedback_frontend/ main myconfig 2>&1 | logger -t "lf_frontend"
185 Make it executable:
187 chmod +x /opt/liquid_feedback_frontend/run.sh
189 On systemd based systems, create a file named
190 `/etc/systemd/system/liquid_feedback_frontend.service`:
192 [Unit]
193 Description=LiquidFeedback Frontend
195 [Service]
196 User=www-data
197 ExecStart=/opt/liquid_feedback_frontend/run.sh
199 [Install]
200 WantedBy=multi-user.target
202 Enable and start the service:
203 systemctl start liquid_feedback_frontend
204 systemctl enable liquid_feedback_frontend
207 In the latter case, the Moonbridge server will open a TCP port according to
208 your configuration. Directly accessing this TCP port through your webbrowser
209 is helpful for development purposes. For real-life deployment, however, it is
210 recommended to further proxy the application (e.g. using nginx). The proxy can
211 also add HTTPS and/or HTTP/2 support (which is not supported by Moonbridge
212 itself).

Impressum / About Us