Does application.yml support environment variables?
You even can add default value, if environment variable not provided:
logging:
level:
root: ${LOGGING_LEVEL_ROOT:info}
Try ${OPENSHIFT_DIY_PORT}
(the usual Spring placeholder notation). See here for docs.