-
Notifications
You must be signed in to change notification settings - Fork 9
/
manifest.jps
56 lines (52 loc) · 2.21 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
type: install
version: 1.7
id: djangocms
logo: https://download.jelastic.com/public.php?service=files&t=bf35478b7707b5269d44adfe07b093a6&download
homepage: http://django-cms.org/
name: DjangoCMS
globals:
webroot: /var/www/webroot/
password: ${fn.password}
RESET_PASS_SCRIPT: /var/www/webroot/ROOT/resetpassword.sh
nodes:
nodeType: apache-python
cloudlets: 8
onInstall:
- cmd[cp]: |-
yum -y install cairo-devel
user: root
- cmd[cp]: |-
cd ${globals.webroot} && rm -rf ROOT
python3 -m venv ${globals.webroot}
source bin/activate
pip install --upgrade pip
pip install djangocms-installer
pip install pytz
pip install dj-database-url==0.5.0
pip install django
djangocms -s -f -p . ROOT
chown apache:apache *
sed -i "s|ALLOWED_HOSTS = \[.*|ALLOWED_HOSTS = \['*'\]|g" ROOT/settings.py
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}
python3 manage.py collectstatic
cp -r ${globals.webroot}/static/* ${globals.webroot}/ROOT/static/
echo "WSGIApplicationGroup %{GLOBAL}" >> /etc/httpd/conf.d/wsgi.conf
python_path=$(ls ${globals.webroot}/lib/)
[ -z $python_path ] && python_path=$([[ -d "${globals.webroot}/lib/python3.11" ]] && echo "python3.11" || echo "python3.10")
sed -ri "s|import os|import os\nimport sys\nsys.path.append('${globals.webroot}/lib/${python_path}/site-packages')|g" ${globals.webroot}/ROOT/wsgi.py
echo "/var/www/webroot/" >> /etc/jelastic/redeploy.conf
jem service restart
success: |
Below you will find your domain name link.
Domain name URL: [${env.protocol}://${env.domain}/](${env.protocol}://${env.domain}/)
Admin panel URL: [${env.protocol}://${env.domain}/admin/](${env.protocol}://${env.domain}/admin/)
Admin name: admin
Password: ${globals.password}
To add custom domain name for your DjangoCMS installation follow the steps described in our [documentation](http://docs.jelastic.com/custom-domains)