From ebac6b71accf8c7bd673b3a3ff3122d669ed488c Mon Sep 17 00:00:00 2001 From: Volodymyr Kolesnykov Date: Wed, 4 Dec 2024 15:32:50 +0200 Subject: [PATCH] refactor(dev-env): bypass Lando entrypoint for auxiliary images --- assets/dev-env.lando.template.yml.ejs | 38 ++++++--------------------- src/lib/constants/dev-environment.ts | 2 +- 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/assets/dev-env.lando.template.yml.ejs b/assets/dev-env.lando.template.yml.ejs index b7ab57bac..1e45e8506 100644 --- a/assets/dev-env.lando.template.yml.ejs +++ b/assets/dev-env.lando.template.yml.ejs @@ -19,18 +19,14 @@ services: type: compose services: image: ghcr.io/automattic/vip-container-images/dev-tools:0.9 - command: /bin/true volumes: - devtools:/dev-tools - scripts:/scripts - environment: - LANDO_NO_USER_PERMS: 1 - LANDO_NO_SCRIPTS: 1 - LANDO_NEEDS_EXEC: 1 volumes: devtools: {} scripts: initOnly: true + entrypoint: /bin/true nginx: type: compose @@ -38,14 +34,10 @@ 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() %> + entrypoint: /usr/sbin/nginx -g "daemon off;" php: type: compose @@ -118,18 +110,13 @@ services: type: compose services: image: memcached:1.6-alpine - command: memcached -m 64 - environment: - LANDO_NO_USER_PERMS: 1 - LANDO_NO_SCRIPTS: 1 - LANDO_NEEDS_EXEC: 1 + entrypoint: /usr/local/bin/memcached -m 64 <% if ( phpmyadmin ) { %> phpmyadmin: type: compose services: image: phpmyadmin:5 - command: /docker-entrypoint.sh apache2-foreground environment: MYSQL_ROOT_PASSWORD: '' PMA_HOSTS: database @@ -145,6 +132,7 @@ services: - pma_www:/var/www/html volumes: pma_www: + entrypoint: /docker-entrypoint.sh apache2-foreground <% } %> <% if ( elasticsearch ) { %> @@ -152,7 +140,6 @@ services: type: compose services: image: elasticsearch:7.17.8 - command: /usr/local/bin/docker-entrypoint.sh environment: ELASTICSEARCH_IS_DEDICATED_NODE: 'no' ELASTICSEARCH_CLUSTER_NAME: 'bespin' @@ -160,15 +147,13 @@ services: ELASTICSEARCH_PORT_NUMBER: 9200 discovery.type: 'single-node' xpack.security.enabled: 'false' - LANDO_NO_USER_PERMS: 1 - LANDO_NO_SCRIPTS: 1 - LANDO_NEEDS_EXEC: 1 ports: - ":9200" volumes: - search_data:/usr/share/elasticsearch/data volumes: search_data: + entrypoint: /usr/local/bin/docker-entrypoint.sh <% } %> wordpress: @@ -215,7 +200,6 @@ services: type: compose services: image: ghcr.io/automattic/vip-container-images/skeleton:latest - command: exit 0 volumes: - clientcode_clientmuPlugins:/clientcode/client-mu-plugins - clientcode_images:/clientcode/images @@ -233,6 +217,7 @@ services: clientcode_themes: {} clientcode_vipconfig: {} initOnly: true + entrypoint: /bin/true <% } %> <% if ( mailpit ) { %> @@ -240,13 +225,10 @@ services: type: compose services: image: axllent/mailpit:latest - command: /mailpit ports: - ":1025" - ":8025" - environment: - LANDO_NO_USER_PERMS: 1 - LANDO_NEEDS_EXEC: 1 + entrypoint: /mailpit <% } %> <% if ( photon ) { %> @@ -254,13 +236,9 @@ services: type: compose services: image: ghcr.io/automattic/vip-container-images/photon:latest - command: /usr/sbin/php-fpm - environment: - LANDO_NO_USER_PERMS: 1 - LANDO_NO_SCRIPTS: 1 - LANDO_NEEDS_EXEC: 1 volumes: - ./uploads:/usr/share/webapps/photon/uploads:ro + entrypoint: /usr/sbin/php-fpm <% } %> tooling: diff --git a/src/lib/constants/dev-environment.ts b/src/lib/constants/dev-environment.ts index a00b9979f..196c86fb7 100644 --- a/src/lib/constants/dev-environment.ts +++ b/src/lib/constants/dev-environment.ts @@ -49,4 +49,4 @@ export const DEV_ENVIRONMENT_DEFAULTS = { phpVersion: Object.keys( DEV_ENVIRONMENT_PHP_VERSIONS )[ 0 ], } as const; -export const DEV_ENVIRONMENT_VERSION = '2.1.2'; +export const DEV_ENVIRONMENT_VERSION = '2.1.3';