Why is one not allowed to use a Boolean in a docker-compose.yml?
This come from a design choice of YAML language about booleans

Every unquoted value matching this "regex":

 y|Y|yes|Yes|YES|n|N|no|No|NO
|true|True|TRUE|false|False|FALSE
|on|On|ON|off|Off|OFF


Will be converted to True  or False.

This start causing a problem when your code will test an environment value to be yes or no for example taking this script (other examples in the PR discution):

if [ "$SOME_VAR" == "yes" ];
then
  echo "Variable SOME_VAR is activated"
else
  echo "Variable SOME_VAR is NOT activated"
fi


And setting in your compose file

environment:
  SOME_VAR: yes


Will result in SOME_VAR being True when the script run, hence taking the wrong case as it is not equal to yes.

So the choice has been made to disallow boolean to prevent unwanted behaviors hard to debug when you're not aware of the YAML rule.

I see two way to get over the problem:


Using an env_file instead, they are not parsed IIRC and should prevent the conversion.
As you already said, use a wrapper script around your launcher to define the value instead before launching the app, something along the line of this should do:

AUTOAPPLY=false
if [ "$SOME_VAR" == "true" ]
then
    AUTOAPPLY=true
fi

./target/universal/stage/bin/APPNAME -Dplay.evolutions.db.default.autoApply=$AUTOAPPLY