diff --git a/assets/dev-env.lando.template.yml.ejs b/assets/dev-env.lando.template.yml.ejs index ccf72dfd0..bfcc12bed 100644 --- a/assets/dev-env.lando.template.yml.ejs +++ b/assets/dev-env.lando.template.yml.ejs @@ -73,7 +73,7 @@ services: devtools: condition: service_completed_successfully wordpress: - condition: service_started + condition: service_completed_successfully <% if ( muPlugins.mode == 'image' ) { %> vip-mu-plugins: condition: service_started @@ -191,8 +191,6 @@ services: type: compose services: image: ghcr.io/automattic/vip-container-images/wordpress:<%= wordpress.tag %> -# command: /usr/local/bin/entrypoint.sh - command: sh -c "rsync -a --chown=www-data:www-data /wp/ /shared/; sleep infinity" volumes: - ./wordpress:/shared - type: volume @@ -200,10 +198,8 @@ services: target: /scripts volume: nocopy: true -# environment: -# LANDO_NO_SCRIPTS: 1 -# LANDO_NEEDS_EXEC: 1 -# initOnly: true + initOnly: true + entrypoint: /usr/bin/rsync -a --chown=${LANDO_HOST_USER_ID}:${LANDO_HOST_GROUP_ID} /wp/ /shared/ <% if ( muPlugins.mode == 'image' ) { %> vip-mu-plugins: diff --git a/src/lib/dev-environment/dev-environment-lando.ts b/src/lib/dev-environment/dev-environment-lando.ts index 026e976d1..479795094 100644 --- a/src/lib/dev-environment/dev-environment-lando.ts +++ b/src/lib/dev-environment/dev-environment-lando.ts @@ -7,7 +7,7 @@ import landoUtils, { type AppInfo } from 'lando/plugins/lando-core/lib/utils'; import landoBuildTask from 'lando/plugins/lando-tooling/lib/build'; import { lookup } from 'node:dns/promises'; import { mkdir, rename } from 'node:fs/promises'; -import { tmpdir } from 'node:os'; +import { tmpdir, userInfo } from 'node:os'; import path, { dirname } from 'node:path'; import { satisfies } from 'semver'; import xdgBasedir from 'xdg-basedir'; @@ -89,6 +89,10 @@ async function getLandoConfig(): Promise< LandoConfig > { home: fakeHomeDir, domain: 'vipdev.lndo.site', version: 'unknown', + env: { + LANDO_HOST_USER_ID: process.platform === 'win32' ? '1000' : `${ userInfo().uid }`, + LANDO_HOST_GROUP_ID: process.platform === 'win32' ? '1000' : `${ userInfo().gid }`, + }, }; return buildConfig( config );