Skip to content

Commit

Permalink
cli: Fix docker sftp volume mapping (#21547)
Browse files Browse the repository at this point in the history
The previous code was not mapping the volumes correctly. It seemed to be
assuming it was mapping over the target paths rather than the
"src:target" strings.

Also it seems we need to put everything under /home/wordpress, otherwise
the symlinks fail.
  • Loading branch information
anomiex authored Oct 27, 2021
1 parent 3fe98c8 commit de3c861
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/cli/helpers/docker-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ const setMappings = ( argv, config ) => {

if ( argv.type === 'dev' ) {
mappingsCompose.services.sftp = {
volumes: volumesMapping.map( vol =>
vol.startsWith( '/var/www/html' ) ? '/home/wordpress' + vol : vol
),
volumes: volumesMapping.map( vol => vol.replace( ':', ':/home/wordpress' ) ),
};
}

Expand Down

0 comments on commit de3c861

Please sign in to comment.