I am running a Dokku application in production and should know which version of the application is running on the server.
Is this possible with Dokku?
No plugin needed.
All apps in dokku are git bare repositories. Just connect to your server, switch to the application directory (mine are in /home/dokku/<app-name> ) and run git log . This should also do the trick.
/home/dokku/<app-name>
git log
Yes, you can add SHA1 from the last git commit using this plugin: https://github.com/dokku-alt/dokku-alt/tree/master/plugins/dokku-git-rev
There are many other alternatives based on different scenarios and different environments. If you deploy Node.JS applications and use package.json correctly, you can easily parse the version using the standard fs library; JSON.parse(fs.readFileSync('package.json')).version
JSON.parse(fs.readFileSync('package.json')).version