-
Notifications
You must be signed in to change notification settings - Fork 29
Update docker volume mounting #188
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
Update docker volume mounting #188
Conversation
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
…tings Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
src/helper/class-ee-site.php
Outdated
| $volume_prefix = \EE\Site\Utils\get_site_prefix( $site_url ); | ||
| $finder = new Finder(); | ||
| $finder->in( $volumes_dir ); | ||
| $volumes_to_delete = $finder->directories()->name( $volume_prefix . '*' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finding volume prefix and deleting them is unnecessary. Please create volumes using labels.
Example
docker volume create \
--label "org.label-schema.vendor=EasyEngine" \
--label "io.easyengine.site=one.test" \
onetest_htdocs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command will list the volumes with specific label
docker volume ls --filter="label=org.label-schema.vendor=EasyEngine" --filter="label=io.easyengine.site=one.test"
Adding the -q flag will only display the name
docker volume ls --filter="label=org.label-schema.vendor=EasyEngine" --filter="label=io.easyengine.site=one.test" -q
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docker Root Dir - docker info 2> /dev/null | awk '/Docker Root Dir/ {print $4}'
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
mbtamuli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except a few minor changes.
Co-Authored-By: mrrobot47 <riddheshsanghvi96@gmail.com>
Co-Authored-By: mrrobot47 <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
db30b68
Closes #187
Depends on EasyEngine/easyengine#1259
Depends on EasyEngine/dockerfiles#40