forked from overhangio/tutor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79de7af
commit fa0527e
Showing
4 changed files
with
77 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# The initialization job contains various re-install operations needed to be done | ||
# on mounted directories (edx-platform, /mnt/*xblock, /mnt/<edx-ora, search, enterprise>) | ||
|
||
echo "Performing additional setup for bind-mounted directories." | ||
set -x # Echo out executed lines | ||
|
||
cd /openedx/edx-platform || exit 1 | ||
|
||
# Whenever edx-platform or installable packages (e.g., xblocks) are mounted, | ||
# during the image build, they are copied over to container and installed. This | ||
# results in egg_info generation for the mounted directories. However, the | ||
# egg_info is not carried over to host. When the containers are launched, the | ||
# host directories without egg_info are mounted on runtime and disappear from | ||
# pip list. To fix this, we `pip install` edx-platform (".") and every mounted | ||
# package ("./mnt/*") again, re-generating the egg-infos. | ||
for mounted_dir in . /mnt/*; do | ||
if [ -f $mounted_dir/setup.py ] && ! ls $mounted_dir/*.egg-info >/dev/null 2>&1 ; then | ||
echo "Unable to locate egg-info in $mounted_dir -- generating now." | ||
pip install -e $mounted_dir | ||
fi | ||
done | ||
|
||
# The same problem exists for edx-platform's compiled frontend assets, but recompiling | ||
# them is very slow. So, instead of re-compiling, we create symlinks to an alternate | ||
# directory in which we expect them to have been cached (/openedx/assets). | ||
ln-assets /openedx/assets /openedx/edx-platform | ||
|
||
set -x | ||
echo "Done setting up bind-mounted directories." |