-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmanifest.jps
76 lines (65 loc) · 3.45 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
65
66
67
68
69
70
71
72
73
74
75
76
type: install
jpsVersion: '0.2'
id: modx
name: MODX
version: 2.4.2
homepage: https://modx.com/
categories:
- apps/content-management
logo: images/modx.png
description: MODX is the web content management platform for those who care about no-compromise design and exceptional user experience. It gives you complete control over your site and content, with the flexibility and scalability to adapt to your changing needs.
baseUrl: https://raw.githubusercontent.com/jelastic-jps/modx/main/
mixins:
- configs/vers.yaml
globals:
DB_PASS: ${fn.password(10)}
ADMIN_PASS: ${fn.password(10)}
nodes:
- cloudlets: 8
nodeType: apache2
engine: php8.2
- cloudlets: 8
nodeType: mysql8
onInstall:
- deploy
- createDb
- configureApp
actions:
deploy:
deploy:
name: modx-${globals.version_modx}.zip
context: ROOT
archive: https://modx.s3.amazonaws.com/releases/${globals.version_modx_short}/modx-${globals.version_modx}.zip
createDb:
cmd[sqldb]: |-
MYSQL_PWD=${nodes.mysql8.password} mysql -uroot -e "CREATE DATABASE modx;"
MYSQL_PWD=${nodes.mysql8.password} mysql -uroot -e "CREATE USER 'modx'@'%' IDENTIFIED BY '${globals.DB_PASS}';"
MYSQL_PWD=${nodes.mysql8.password} mysql -uroot -e "GRANT ALL PRIVILEGES ON modx.* TO 'modx'@'%' WITH GRANT OPTION;"
configureApp:
- cmd [cp]: sed -i 's|;extension=gd.so|extension=gd.so|g' /etc/php.ini
user: root
- restartNodes [cp]
- cmd [cp]: |-
ROOT="/var/www/webroot/ROOT/";
cp $ROOT/setup/config.dist.new.xml $ROOT/setup/config.xml
sed -i 's|<database_server>localhost<|<database_server>${nodes.mysql8.address}<|g' $ROOT/setup/config.xml
sed -i 's|<database>modx_modx<|<database>modx<|g' $ROOT/setup/config.xml
sed -i 's|<database_user>db_username<|<database_user>modx<|g' $ROOT/setup/config.xml
sed -i 's|<database_password>db_password|<database_password>${globals.DB_PASS}|g' $ROOT/setup/config.xml
sed -i 's|<cmsadmin>username<|<cmsadmin>admin<|g' $ROOT/setup/config.xml
sed -i 's|<cmspassword>password<|<cmspassword>${globals.ADMIN_PASS}<|g' $ROOT/setup/config.xml
sed -i 's|<cmsadminemail>[email protected]<|<cmsadminemail>${user.email}<|g' $ROOT/setup/config.xml
sed -i 's|<context_mgr_path>/www/modx/manager/<|<context_mgr_path>/var/www/webroot/ROOT/manager/<|g' $ROOT/setup/config.xml
sed -i 's|<context_mgr_url>/modx/manager/<|<context_mgr_url>/manager/<|g' $ROOT/setup/config.xml
sed -i 's|<context_connectors_path>/www/modx/connectors/<|<context_connectors_path>/var/www/webroot/ROOT/connectors/<|g' $ROOT/setup/config.xml
sed -i 's|<context_connectors_url>/modx/connectors/<|<context_connectors_url>/connectors/<|g' $ROOT/setup/config.xml
sed -i 's|<context_web_path>/www/modx/<|<context_web_path>/var/www/webroot/ROOT/<|g' $ROOT/setup/config.xml
sed -i 's|<context_web_url>/modx/<|<context_web_url>/<|g' $ROOT/setup/config.xml
cd $ROOT/setup && php ./index.php --installmode=new
startPage: manager/
success: |-
Use the following credentials to access the MODX admin panel:
**Admin panel URL:** [${env.protocol}://${env.domain}/manager/](${env.protocol}://${env.domain}/manager/)
**Admin name:** admin
**Admin password:** ${globals.ADMIN_PASS}
To add a custom domain name for your MODX installation, follow the steps described in our [documentation](https://www.virtuozzo.com/application-platform-docs/custom-domains/).