-
Notifications
You must be signed in to change notification settings - Fork 25
Description
The load.sh script contains this line:
listOfImages+=("DX_DOCKER_IMAGE_PREREQS_CHECKER:hcl-prereqs-checker-image")
This should be:
listOfImages+=("DX_DOCKER_IMAGE_PREREQS_CHECKER:hcl-dx-prereqs-checker-image")
The scripts, when docker compose is executed as the root user, create directories in the .volumes directory. These directories are all created with root:root as the uid:gid. The containers, however run as 1000:1000 (core) and 1000:1001 (dam). These containers can't create directories under ./volumes/core/wp_profile, ./volumes/dam/db or ./volumes/dam/upload. As a result, the container error and exit. It would be good to either create these directories beforehand with the proper uid:gid, or script the init-scripts to do this there.
To fix it, I've added the following lines to set.sh. Just a suggestion:
export DX_PERSISTENT_PATH=/local/DX/data # location of persistent directories
if [ ! -d "$DX_PERSISTENT_PATH/core" ]
then
mkdir -p $DX_PERSISTENT_PATH/{core/wp_profile,dam/{db,upload}}
chown -R 1000:1000 $DX_PERSISTENT_PATH
chown -R 1000:1001 $DX_PERSISTENT_PATH/dam
fi
That also allows for these volumes in the dx.yaml:
- ${DX_PERSISTENT_PATH:?.volumes}/core/wp_profile:/mnt/prereqs-checks-volumes/wp_profile
Personally, I wouldn't want my persistent volume in the same directory where the git scripts are.