-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathmanifest.jps
57 lines (48 loc) · 2.44 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
type: install
version: 1.7
id: djangocms
name: Django CMS
homepage: https://www.django-cms.org/
baseUrl: https://raw.githubusercontent.com/jelastic-jps/django-cms/master
description: Django CMS is an open-source content management system with a user-friendly interface and rich feature set. Django CMS is aimed at helping developers to take applications from concept to completion as quickly as possible, avoiding common security issues, and flexibly scaling your busy websites.
logo: images/cms_icon.png
globals:
webroot: /var/www/webroot/
password: ${fn.password}
RESET_PASS_SCRIPT: /var/www/webroot/ROOT/resetpassword.sh
nodes:
nodeType: apache-python
engine: python3.12
cloudlets: 8
onInstall:
- cmd[cp]: |-
cd ${globals.webroot} && rm -rf ROOT
python3 -m venv ${globals.webroot}
source bin/activate
pip install --upgrade pip
pip install django-cms
djangocms --noinput --username admin --email ${user.email} ROOT .
echo "STATIC_ROOT = BASE_DIR / 'static'" >> ROOT/settings.py
python manage.py collectstatic --noinput
cp -r ${globals.webroot}/static/* ${globals.webroot}/ROOT/static/
sed -i "s|ALLOWED_HOSTS = \[.*|ALLOWED_HOSTS = \['*'\]|g" ROOT/settings.py
echo "WSGIApplicationGroup %{GLOBAL}" >> /etc/httpd/conf.d/wsgi.conf
echo "python manage.py shell << EOF
from django.contrib.auth.models import User
l = User.objects.all()
u = l[0]
u.set_password('${globals.password}')
u.save()
EOF" > ${globals.RESET_PASS_SCRIPT}
chmod +x ${globals.RESET_PASS_SCRIPT} && ${globals.RESET_PASS_SCRIPT}
python_version=$(python -c "import sys; print(f'{sys.version_info[0]}.{sys.version_info[1]}')")
sed -ri "s|import os|import os\nimport sys\nsys.path.append('${globals.webroot}/lib/python${python_version}/site-packages')|g" ${globals.webroot}/ROOT/wsgi.py
jem service restart
success: |
Your Django CMS installation is available at:
**App URL:** [${env.protocol}://${env.domain}/](${env.protocol}://${env.domain}/)
Use the following credentials to access the Django CMS admin panel:
**Admin panel URL:** [${env.protocol}://${env.domain}/admin/](${env.protocol}://${env.domain}/admin/)
**Admin name:** admin
**Admin password:** ${globals.password}
To add a custom domain name for your Django CMS installation, follow the steps described in our [documentation](https://www.virtuozzo.com/application-platform-docs/custom-domains/).