From 6d13d47265716cd08471cadd4a81761013c7aac5 Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Sat, 7 Dec 2024 09:10:45 +0200 Subject: [PATCH] fix: set dependencies between services --- assets/dev-env.lando.template.yml.ejs | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/assets/dev-env.lando.template.yml.ejs b/assets/dev-env.lando.template.yml.ejs index d94a42d37..ccf72dfd0 100644 --- a/assets/dev-env.lando.template.yml.ejs +++ b/assets/dev-env.lando.template.yml.ejs @@ -22,10 +22,6 @@ services: volumes: - devtools:/dev-tools - scripts:/scripts - environment: - LANDO_NO_USER_PERMS: 1 - LANDO_NO_SCRIPTS: 1 - LANDO_NEEDS_EXEC: 1 volumes: devtools: {} scripts: @@ -38,14 +34,13 @@ services: sslExpose: false services: image: ghcr.io/automattic/vip-container-images/nginx:latest - command: nginx -g "daemon off;" - environment: - LANDO_NEEDS_EXEC: 1 - LANDO_WEBROOT_USER: nginx - LANDO_WEBROOT_GROUP: nginx volumes: - ./nginx/extra.conf:/etc/nginx/conf.extra/extra.conf <% wpVolumes() %> + depends_on: + php: + condition: service_started + entrypoint: /usr/sbin/nginx -g "daemon off;" php: type: compose @@ -77,6 +72,16 @@ services: <% } %> devtools: condition: service_completed_successfully + wordpress: + condition: service_started +<% if ( muPlugins.mode == 'image' ) { %> + vip-mu-plugins: + condition: service_started +<% } %> +<% if ( appCode.mode == 'image' ) { %> + demo-app-code: + condition: service_completed_successfully +<% } %> volumes: - type: volume source: devtools