-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmanifest.jps
64 lines (54 loc) · 2.77 KB
/
manifest.jps
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
type: install
version: 1.7
id: lime
name: LimeSurvey
baseUrl: https://raw.githubusercontent.com/jelastic-jps/limesurvey/master/
homepage: http://www.limesurvey.org
logo: images/limesurvey.png
description: |-
LimeSurvey (formerly PHPSurveyor) is an open source online survey application written in PHP based on a MySQL, PostgreSQL or MSSQL database. It enables users
without coding knowledge to develop, publish and collect responses to surveys.
Surveys can include branching, custom preferred layout and design (using a web template system), and can provide basic statistical analysis of survey results.
mixins:
- configs/vers.yaml
nodes:
- cloudlets: 8
nodeType: apache2
engine: php8.2
- cloudlets: 8
nodeType: mysql8
categories:
- apps/content-management
globals:
DB_PASS: ${fn.password(10)}
APP_CONFIG_PATH: /var/www/webroot/ROOT/application/config/config.php
ADMIN_PASS: ${fn.password(10)}
WEBROOT: /var/www/webroot/ROOT/
onInstall:
- deploy:
name: limesurvey-${globals.version_limesurvey}.zip
context: ROOT
archive: https://github.com/LimeSurvey/LimeSurvey/archive/${globals.version_limesurvey}.zip
- cmd[sqldb]: |-
MYSQL_PWD=${nodes.mysql8.password} mysql -uroot -e "CREATE DATABASE limesurvey;"
MYSQL_PWD=${nodes.mysql8.password} mysql -uroot -e "CREATE USER 'lime'@'%' IDENTIFIED BY '${globals.DB_PASS}';"
MYSQL_PWD=${nodes.mysql8.password} mysql -uroot -e "GRANT ALL PRIVILEGES ON limesurvey.* TO 'lime'@'%' WITH GRANT OPTION;"
- cmd [cp]: |-
cp ${globals.WEBROOT}/application/config/config-sample-mysql.php ${globals.WEBROOT}/application/config/config.php
sed -i "s|host=localhost|host=${nodes.sqldb.address}|g" ${globals.APP_CONFIG_PATH}
sed -i "s|'password' => '.*',|'password' => '${nodes.sqldb.password}',|g" ${globals.APP_CONFIG_PATH}
sed -i 's|$oDB->quoteValue("L" . (string) $key + 1)| $oDB->quoteValue("L" . (string) ($key + 1))|g' ${globals.WEBROOT}/application/helpers/update/updatedb_helper.php
cd ${globals.WEBROOT}application/commands;
DBENGINE=MyISAM php console.php install admin '${globals.ADMIN_PASS}' Admin ${user.email}
sed -i "s|'username' => 'root'|'username' => 'lime'|g" ${globals.APP_CONFIG_PATH}
sed -i "s|'password' => '${nodes.sqldb.password}',|'password' => '${globals.DB_PASS}',|g" ${globals.APP_CONFIG_PATH}
- restartNodes [cp]: {}
success: |-
Your LimeSurvey platform is being installed.
The details of the LimeSurvey installation are shown below:
Path : /var/www/webroot/ROOT
URL : ${env.protocol}://${env.domain}/
Admin URL : [${env.protocol}://${env.domain}/index.php?r=admin/authentication/sa/login](${env.protocol}://${env.domain}/index.php?r=admin/authentication/sa/login)
Admin Username : admin
Admin Password : ${globals.ADMIN_PASS}
Admin Email: ${user.email}