wardenenv/warden

Magento 2 env PHP 8.2 issue [warden env pull && warden env up]

vadim-shulyak opened this issue · 6 comments

Version of Warden

0.15.0-deb

Operating System and Installation Method

MAC OS Ventura 13.3.1 (a) (M1 apple silicon) via Brew

Describe the Bug

Can't build env with PHP 8.2

  1. Update .env file: set
    PHP_VERSION=8.2
  2. Run:
    warden env pull && warden env up

image

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected Behavior

No response

Additional context

No response

The manual configuration seems to work, needs to:

  1. Create:

.warden/warden-env.yml

version: "3.5"
services:
  php-fpm:
    image: ghcr.io/wardenenv/php-fpm:8.2-magento2
  php-debug:
    image: ghcr.io/wardenenv/php-fpm:8.2-magento2-xdebug3
  1. Update .env file: set PHP_VERSION=8.2
  2. Run warden env pull && warden env up

I was able to use warden shell
Then I faced the issue with files permission, and I had to change files owner via sudo chown -R www-data:www-data .

bap14 commented

By default the Magento project will include Node in the PHP images, which you're excluding here. I'm guessing that the Node version specified may not build with the PHP 8.2 image. Given that it's showing "manifest unknown" that generally means the image you're requesting doesn't exist.

Do you have a NODE_VERSION specified in your .env file? If not try adding NODE_VERSION=18 to your .env file and starting the project again.

navarr commented

For an error like this, please provide the output of warden env config

@navarr, please see the output

name: projectname
services:
  db:
    command:
      - mysqld
      - --max_allowed_packet=1024M
      - --explicit_defaults_for_timestamp=on
    environment:
      MYSQL_DATABASE: magento
      MYSQL_PASSWORD: magento
      MYSQL_ROOT_PASSWORD: magento
      MYSQL_USER: magento
    hostname: projectname-mariadb
    image: mariadb:10.4
    networks:
      default: null
    volumes:
      - type: volume
        source: dbdata
        target: /var/lib/mysql
        volume: {}
  elasticsearch:
    environment:
      ES_JAVA_OPTS: -Xms64m -Xmx512m
      discovery.type: single-node
      xpack.security.enabled: "false"
    hostname: projectname-elasticsearch
    image: ghcr.io/drpayyne/warden-elasticsearch:7.9
    labels:
      traefik.enable: "true"
      traefik.http.routers.projectname-elasticsearch.rule: Host(`elasticsearch.projectname.test`)
      traefik.http.routers.projectname-elasticsearch.tls: "true"
      traefik.http.services.projectname-elasticsearch.loadbalancer.server.port: "9200"
    networks:
      default: null
    volumes:
      - type: volume
        source: esdata
        target: /usr/share/elasticsearch/data
        volume: {}
  nginx:
    depends_on:
      php-fpm:
        condition: service_started
    environment:
      NGINX_PUBLIC: /pub
      NGINX_TEMPLATE: magento2.conf
      XDEBUG_CONNECT_BACK_HOST: host.docker.internal
    hostname: projectname-nginx
    image: ghcr.io/drpayyne/warden-nginx:1.16
    labels:
      traefik.enable: "true"
      traefik.http.routers.projectname-nginx.priority: "2"
      traefik.http.routers.projectname-nginx.rule: ' HostRegexp(`{subdomain:.+}.projectname.test`)
        || Host(`projectname.test`)'
      traefik.http.routers.projectname-nginx.tls: "true"
      traefik.http.services.projectname-nginx.loadbalancer.server.port: "80"
    networks:
      default: null
    volumes:
      - type: volume
        source: appdata
        target: /var/www/html
        volume: {}
      - type: bind
        source: /Users/vshuliak/PhpStormProjects/projectname/pub/media
        target: /var/www/html/pub/media
        bind:
          create_host_path: true
  php-debug:
    depends_on:
      php-fpm:
        condition: service_started
    environment:
      CHOWN_DIR_LIST: 'pub/media /bash_history /home/www-data/.ssh '
      COMPOSER_MEMORY_LIMIT: "-1"
      COMPOSER_VERSION: "2"
      HISTFILE: /bash_history/.bash_history
      MAGE_DEBUG_SHOW_ARGS: "1"
      NODE_VERSION: "10"
      PHP_IDE_CONFIG: serverName=projectname-docker
      SSH_AUTH_SOCK: /tmp/ssh-auth.sock
      TRAEFIK_DOMAIN: projectname.test
      TRAEFIK_SUBDOMAIN: app
    extra_hosts:
      app.projectname.test: 0.0.0.0
      projectname.test: 0.0.0.0
    hostname: projectname-php-debug
    image: ghcr.io/drpayyne/warden-php-m2-xdebug3:8.2-deb
    networks:
      default: null
    volumes:
      - type: volume
        source: bashhistory
        target: /bash_history
        volume: {}
      - type: bind
        source: /Users/vshuliak/.warden/ssl/rootca/certs
        target: /etc/ssl/warden-rootca-cert
        read_only: true
        bind:
          create_host_path: true
      - type: bind
        source: /Users/vshuliak/.composer
        target: /home/www-data/.composer
        bind:
          create_host_path: true
      - type: volume
        source: sshdirectory
        target: /home/www-data/.ssh
        volume: {}
      - type: bind
        source: /run/host-services/ssh-auth.sock
        target: /run/host-services/ssh-auth.sock
        bind:
          create_host_path: true
      - type: volume
        source: appdata
        target: /var/www/html
        volume: {}
      - type: bind
        source: /Users/vshuliak/PhpStormProjects/projectname/pub/media
        target: /var/www/html/pub/media
        bind:
          create_host_path: true
  php-fpm:
    depends_on:
      db:
        condition: service_started
    environment:
      CHOWN_DIR_LIST: 'pub/media /bash_history /home/www-data/.ssh '
      COMPOSER_MEMORY_LIMIT: "-1"
      COMPOSER_VERSION: "2"
      HISTFILE: /bash_history/.bash_history
      MAGE_DEBUG_SHOW_ARGS: "1"
      NODE_VERSION: "10"
      SSH_AUTH_SOCK: /tmp/ssh-auth.sock
      TRAEFIK_DOMAIN: projectname.test
      TRAEFIK_SUBDOMAIN: app
      WARDEN_ENV_NAME: projectname
      WARDEN_RABBITMQ: "1"
      WARDEN_REDIS: "1"
      WARDEN_VARNISH: "0"
    extra_hosts:
      app.projectname.test: 0.0.0.0
      projectname.test: 0.0.0.0
    hostname: projectname-php-fpm
    image: ghcr.io/drpayyne/warden-php-m2:8.2-deb
    labels:
      traefik.enable: "true"
      traefik.http.routers.projectname-livereload.priority: "3"
      traefik.http.routers.projectname-livereload.rule: ' (HostRegexp(`{subdomain:.+}.projectname.test`)
        || Host(`projectname.test`)) && (Path(`/livereload.js`) || Path(`/livereload`))'
      traefik.http.routers.projectname-livereload.service: projectname-livereload
      traefik.http.routers.projectname-livereload.tls: "true"
      traefik.http.services.projectname-livereload.loadbalancer.server.port: "35729"
    networks:
      default: null
    volumes:
      - type: volume
        source: bashhistory
        target: /bash_history
        volume: {}
      - type: bind
        source: /Users/vshuliak/.warden/ssl/rootca/certs
        target: /etc/ssl/warden-rootca-cert
        read_only: true
        bind:
          create_host_path: true
      - type: bind
        source: /Users/vshuliak/.composer
        target: /home/www-data/.composer
        bind:
          create_host_path: true
      - type: volume
        source: sshdirectory
        target: /home/www-data/.ssh
        volume: {}
      - type: bind
        source: /run/host-services/ssh-auth.sock
        target: /run/host-services/ssh-auth.sock
        bind:
          create_host_path: true
      - type: volume
        source: appdata
        target: /var/www/html
        volume: {}
      - type: bind
        source: /Users/vshuliak/PhpStormProjects/projectname/pub/media
        target: /var/www/html/pub/media
        bind:
          create_host_path: true
  rabbitmq:
    hostname: projectname-rabbitmq
    image: rabbitmq:3.8-management
    labels:
      traefik.enable: "true"
      traefik.http.routers.projectname-rabbitmq.rule: Host(`rabbitmq.projectname.test`)
      traefik.http.routers.projectname-rabbitmq.tls: "true"
      traefik.http.services.projectname-rabbitmq.loadbalancer.server.port: "15672"
    networks:
      default: null
    volumes:
      - type: volume
        source: rabbitmq
        target: /var/lib/rabbitmq
        volume: {}
  redis:
    hostname: projectname-redis
    image: redis:5.0
    networks:
      default: null
    volumes:
      - type: volume
        source: redis
        target: /data
        volume: {}
networks:
  default:
    name: projectname_default
    labels:
      dev.warden.environment.name: projectname
      dev.warden.environment.type: magento2
volumes:
  appdata:
    name: projectname_appdata
  bashhistory:
    name: projectname_bashhistory
  dbdata:
    name: projectname_dbdata
  esdata:
    name: projectname_esdata
  rabbitmq:
    name: projectname_rabbitmq
  redis:
    name: projectname_redis
  sshdirectory:
    name: projectname_sshdirectory
x-environment:
  - 'CHOWN_DIR_LIST=pub/media /bash_history /home/www-data/.ssh '
x-extra_hosts:
  - projectname.test:0.0.0.0
  - app.projectname.test:0.0.0.0
x-volumes:
  - .//pub/media:/var/www/html/pub/media:cached
  - appdata:/var/www/html
navarr commented

@vadim-shulyak It appears you're using the DrPaynne fork. You'll want to uninstall that and re-install Warden proper. If you keep your container volumes during this migration, you may have to fix file permissions afterwards

@navarr got you, thanks!