-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couple of issues with the scripts #17
Comments
Hy @martdj Could you share how the output of your "set.sh" turned out? Could you also share where you put the string in dx.yaml? I'm having the same problems you reported and I'm not getting through. Thanks |
@setusama COMPOSE_PROJECT_NAME=dx ################################## Make sure that you use '. ./set.sh' or 'source ./set.sh'. many people just run the script. That won't work. |
@martdj Thanks for the answer. What I would like to know is how you declared this information in set.sh and then in dx.yaml. Mine didn't work. thanks |
Not sure I understand what you mean. Those lines are literally the only ones I changed. I then do from the directory with the scripts (/local/DX/dx-docker-compose in my case) That's it. |
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:
Personally, I wouldn't want my persistent volume in the same directory where the git scripts are.
The text was updated successfully, but these errors were encountered: