-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathlms-run.sh
More file actions
33 lines (27 loc) · 882 Bytes
/
lms-run.sh
File metadata and controls
33 lines (27 loc) · 882 Bytes
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
#!/bin/bash
# LMS runner script to support both normal and debug modes
# Usage: lms-run.sh [debug|normal]
# Expected to be run inside the LMS container
set -e
source /edx/app/edxapp/edxapp_env
DEBUG_MODE="${1:-${DEVSTACK_DEBUG:-normal}}"
# Install pip requirements
pip install -r /edx/private_requirements.txt
if [ "$DEBUG_MODE" = "debug" ]; then
# Install debugpy for debug mode
pip install debugpy
# Run with debugpy
while true; do
python -m debugpy --listen 0.0.0.0:44568 --wait-for-client \
/edx/app/edxapp/edx-platform/manage.py lms runserver 0.0.0.0:18000 \
--settings devstack --noreload
sleep 2
done
else
# Run in normal mode
while true; do
python /edx/app/edxapp/edx-platform/manage.py lms runserver 0.0.0.0:18000 \
--settings devstack --noreload
sleep 2
done
fi