Payara/glassfish master password as a secret

In my dockerfile I en with:

CMD ["${PAYARA_PATH}/bin/asadmin","-W","/run/secrets/master","start-domain"]

In my 3.1 compose file I have:

    secrets:
      - master
secrets:
  master:
    file: pwd

after docker stack deploy -c apps.yml the containers won’t start complaining about missing master password.

Am I doing something wrong? Do have other options?

Bye, Eduard

Turns out I was doing something wrong, my secret contained the password whereas it should contain “AS_ADMIN_MASTERPASSWORD=xxxxxx”.

This setup works realy well!