Skip to content

Passing WP_ENVIRONMENT_TYPE not working #870

@ashishjullia

Description

@ashishjullia

I used the following docker-compose.yml:

version: '3.8'

services:
  wordpress:
    image: wordpress:php8.1
    restart: always
    ports:
      - 8099:80
    environment:
      WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST}
      WORDPRESS_DB_USER: ${WORDPRESS_DB_USER}
      WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
      WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME}
      WORDPRESS_DEBUG: 1
      WP_ENVIRONMENT_TYPE: "development"
    volumes:
      - wordpress_data:/var/www/html
    depends_on:
      - wordpress-db
    logging:
      driver: local
      options:
        max-size: "10m"
        max-file: "3"

  wordpress-db:
    image: mariadb
    restart: always
    environment:
      MARIADB_DATABASE: ${MARIADB_DATABASE}
      MARIADB_USER: ${MARIADB_USER}
      MARIADB_PASSWORD: ${MARIADB_PASSWORD}
      MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
    volumes:
      - db_data:/var/lib/mysql
    logging:
      driver: local
      options:
        max-size: "10m"
        max-file: "3"

volumes:
  wordpress_data:
  db_data:

But still getting this:
image

I looked here for the reference:

Also, I removed the volumes and then used new ones but the issue same issue. I even tried using staging, still same.

Am I missing something here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions