Docker-compose not reading environment variables (MYSQL_DATABASE_PASSWORD)

I’m attempting to use Portainer’s default WordPress template to build a little wordpress stack, on a Synology NAS. It outright declares MYSQL_DATABASE_PASSWORD, but on run, I get the following:

You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD

I’ve tried the same for FileRun using their default docker-compose.yml file in their documentation, and even that throws the above error.

I’ve tried exporting any/all of those environment variables, but have found the same issue occurs.

version: '2'

services:
  db:
    image: mariadb:10.1
    environment:
      MYSQL_ROOT_PASSWORD: your_mysql_root_password
      MYSQL_USER: your_filerun_username
      MYSQL_PASSWORD: your_filerun_password
      MYSQL_DATABASE: your_filerun_database
    volumes:
      - /filerun/db:/var/lib/mysql

  web:
    image: afian/filerun
    environment:
      FR_DB_HOST: db
      FR_DB_PORT: 3306
      FR_DB_NAME: your_filerun_database
      FR_DB_USER: your_filerun_username
      FR_DB_PASS: your_filerun_password
      APACHE_RUN_USER: www-data
      APACHE_RUN_USER_ID: 33
      APACHE_RUN_GROUP: www-data
      APACHE_RUN_GROUP_ID: 33
    depends_on:
      - db
    links:
      - db:db
    ports:
      - "80:80"
    volumes:
      - /filerun/html:/var/www/html
      - /filerun/user-files:/user-files

Expected results would be the stack runs, specifically the mariadb container. What actually happens is the container dies, repeatedly, throwing the You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD error.

Source: StackOverflow