Skip to content

Instantly share code, notes, and snippets.

@icarrr
Last active April 4, 2022 02:56
Show Gist options
  • Save icarrr/c3a104f8dbeaa46ae5551345b286cfbd to your computer and use it in GitHub Desktop.
Save icarrr/c3a104f8dbeaa46ae5551345b286cfbd to your computer and use it in GitHub Desktop.

Open edX compile new theme or re-build assets with default theme

#!/bin/bash
THEME_NAME=themeName
sudo chown -R edxapp:edxapp .
sudo -H -u edxapp bash << EOF
echo -n "Now as: " && whoami
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
paver update_assets lms --themes=$THEME_NAME --settings=production
python manage.py lms --settings=production collectstatic --noinput
EOF
echo -n "Back to user: " && whoami
sudo /edx/bin/supervisorctl restart lms
echo "DONE"
#!/bin/bash
sudo chown -R edxapp:edxapp .
sudo -H -u edxapp bash << EOF
echo -n "Now as: " && whoami
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
paver update_assets lms --settings=production
python manage.py lms --settings=production collectstatic --noinput
EOF
echo -n "Back to user: " && whoami
sudo /edx/bin/supervisorctl restart lms
echo "DONE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment