liquid_feedback_frontend

view INSTALL.mkd @ 1859:02c34183b6df

Fixed wrong filename in INSTALL file
author bsw
date Tue Nov 28 18:54:51 2023 +0100 (5 months ago)
parents 7d000a357704
children
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
24 * sassc
26 If you're using any other Linux distribution or BSD system, install the
27 necessary software components accordingly.
30 2. Ensure that the user account of your webserver has access to the database
31 ----------------------------------------------------------------------------
33 The useraccount of Moonbridge server process needs to have access to your
34 PostgreSQL installation. This is done by executing PostgreSQL's shell command
35 `createuser` as database superuser (usually `pgsql`, or `postgres` for
36 Debian installations):
38 su - postgres -s $SHELL
39 createuser --no-superuser --createdb --no-createrole www-data
40 exit
43 3. Install and configure LiquidFeedback-Core
44 --------------------------------------------
46 We recommend to create the database with the same user as your webserver
47 (usually `www-data`) to avoid having to setup database privileges.
49 The example below installs the database as `www-data` and stores the three
50 executables `lf_update`, `lf_update_issue_order` and
51 `lf_update_suggestion_order` in the directory `/opt/liquid_feedback_core/`:
53 # Download and unpack LiquidFeedback-Core
54 # from http://www.public-software-group.org/pub/projects/liquid_feedback/backend/
55 make
56 mkdir /opt/liquid_feedback_core
57 cp core.sql lf_update lf_update_issue_order lf_update_suggestion_order /opt/liquid_feedback_core
58 su www-data -s $SHELL
59 cd /opt/liquid_feedback_core
60 createdb liquid_feedback
61 psql -v ON_ERROR_STOP=1 -f core.sql liquid_feedback
63 A simple configuration may look as follows:
65 psql liquid_feedback
67 INSERT INTO system_setting (member_ttl) VALUES ('1 year');
68 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 hour', 20, 6);
69 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 day', 80, 12);
70 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 hour', 200, 60);
71 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 day', 800, 120);
73 Create an invite code for an admin user:
75 INSERT INTO member (invite_code, admin) VALUES ('sesam', true);
77 Exit the `psql` interface by typing:
79 \q
81 And don't forget to quit the `www-data` shell:
83 exit
86 4. Install Moonbridge
87 ---------------------
89 # Download and unpack Moonbridge
90 # from http://www.public-software-group.org/pub/projects/moonbridge/
91 pmake MOONBR_LUA_PATH=/opt/moonbridge/?.lua
92 mkdir /opt/moonbridge
93 cp moonbridge /opt/moonbridge/
94 cp moonbridge_http.lua /opt/moonbridge/
97 5. Install WebMCP
98 -----------------
100 # Download and unpack WebMCP
101 # from http://www.public-software-group.org/pub/projects/webmcp/
102 make
103 mkdir /opt/webmcp
104 cp -RL framework/* /opt/webmcp/
107 6. Install the LiquidFeedback-Frontend
108 --------------------------------------
110 Unpack source tree into appropriate directory, e.g. `/opt/liquid_feedback_frontend`:
112 # Download LiquidFeedback-Frontend
113 # from http://www.public-software-group.org/pub/projects/liquid_feedback/frontend/
114 mv liquid_feedback_frontend-vX.X.X /opt/liquid_feedback_frontend
116 Make `tmp/` directory of LiquidFeedback-Frontend writable for webserver:
118 chown www-data /opt/liquid_feedback_frontend/tmp
121 7. Configure mail system
122 ------------------------
124 It may be necessary to configure your server's mail system.
127 8. Configure the LiquidFeedback-Frontend
128 ----------------------------------------
130 cd /opt/liquid_feedback_frontend/config
131 cp example.lua myconfig.lua
132 # edit myconfig.lua according to your needs
135 9. Setup regular execution of `lf_update` and related commands
136 --------------------------------------------------------------
138 The executables `lf_update`, `lf_update_issue_order`, and
139 `lf_update_suggestion_order` must be executed regularly. This may be achieved
140 by creating a file named `/opt/liquid_feedback_core/lf_update.sh` with the
141 following contents:
143 #!/bin/sh
145 while true; do
146 nice /opt/liquid_feedback_core/lf_update dbname=liquid_feedback 2>&1 | logger -t "lf_core"
147 nice /opt/liquid_feedback_core/lf_update_issue_order dbname=liquid_feedback 2>&1 | logger -t "lf_core"
148 nice /opt/liquid_feedback_core/lf_update_suggestion_order dbname=liquid_feedback 2>&1 | logger -t "lf_core"
149 sleep 5
150 done
152 This file must be marked as executable:
154 chmod +x /opt/liquid_feedback_core/lf_update.sh
156 And this file should be started automatically at system boot. On systems with
157 systemd, create a file named `/etc/systemd/system/liquid_feedback_core.service`:
159 [Unit]
160 Description=LiquidFeedback Core update
162 [Service]
163 User=www-data
164 ExecStart=/opt/liquid_feedback_core/lf_update.sh
166 [Install]
167 WantedBy=multi-user.target
169 Enable and start the service:
171 systemctl start liquid_feedback_core
172 systemctl enable liquid_feedback_core
175 10. Start the frontend
176 ----------------------
178 After `lf_update` has been executed at least once, you should be able to use
179 your LiquidFeedback system.
181 Create a file named `/opt/liquid_feedback_frontend/run.sh`:
183 #/bin/bash
185 /opt/moonbridge/moonbridge /opt/webmcp/bin/mcp.lua /opt/webmcp/ /opt/liquid_feedback_frontend/ main myconfig 2>&1 | logger -t "lf_frontend"
187 Make it executable:
189 chmod +x /opt/liquid_feedback_frontend/run.sh
191 On systemd based systems, create a file named
192 `/etc/systemd/system/liquid_feedback_frontend.service`:
194 [Unit]
195 Description=LiquidFeedback Frontend
197 [Service]
198 User=www-data
199 ExecStart=/opt/liquid_feedback_frontend/run.sh
201 [Install]
202 WantedBy=multi-user.target
204 Enable and start the service:
206 systemctl start liquid_feedback_frontend
207 systemctl enable liquid_feedback_frontend
210 In the latter case, the Moonbridge server will open a TCP port according to
211 your configuration. Directly accessing this TCP port through your webbrowser
212 is helpful for development purposes. For real-life deployment, however, it is
213 recommended to further proxy the application (e.g. using nginx). The proxy can
214 also add HTTPS and/or HTTP/2 support (which is not supported by Moonbridge
215 itself).

Impressum / About Us