See git commit hash launching a Dokku application?

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?

+5
source share
2 answers

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.

+11
source

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

+3
source

All Articles