Closed benlk closed 11 months ago
@benlk the ~/.aws
directory is already auto-mounted for environments created since the update to V4 of wp-local-docker-v2. See: https://github.com/10up/wp-local-docker-v2/blob/6a1e7a252e4ac94d371bc78d5521df28a145934d/src/commands/create/make-docker-compose.js#L94 and https://github.com/10up/wp-local-docker-v2/blob/6a1e7a252e4ac94d371bc78d5521df28a145934d/src/commands/create/make-docker-compose.js#L108
It's also mentioned as part of the migration guide that should be consulted when updating to V4.X.X.
I must have missed that docker-compose.yml
line when I was updating my environments. Thanks!
Found the issue: I put that line in the wrong spot in my docker-compose.yml
, under nginx
instead of phpfpm
.
Is your enhancement related to a problem? Please describe.
10up/snapshots requires AWS credentials to be located in a file at
~/.aws/credentials
. For Local WP and similar tools where wp-cli runs from the host filesystem, instead of inside the container, this works well.WP Local Docker runs its wp-cli command from within the Docker container, as the user
www-data
, whose home is/home/www-data
within the container.10up/snapshots' docs say:
For wp local docker users, this process requires:
wp-content/
10updocker shell
mkdir -p ~/.aws
cp wp-content/credentials ~/.aws
A better solution would be: automatically mount the host user's
~/.aws
at/home/www-data/.aws/
Designs
No response
Describe alternatives you've considered
I could try to figure out how to put the AWS creds as environment variables in Docker, I guess? Auto-mounting seems simpler.
Code of Conduct