Using private packages for app deployments?

I'm starting to move more of my company's internals to my FreeBSD server and I'm wondering about deployments.
The specific application I'm working on now is a Clojure app which I build into an uberjar and launch with java -jar my-app.jar inside a jail fronted by a caddy jail.

I could build a new jar whenever a new version is ready for release and then scp into the jail and write an rc script using daemon to run it. But I'm wondering if folks take advantage of the ports structure (makefile, etc) to have a reproducible and quick way to install updates and if so how did you set it up in practice e.g., are the package files living alongside your code? in a separate repo? something else?

The appeal of this idea for me is that it provides some reproducibility (sets up users, directories, files, etc) without having to buy into something like Ansible.
 
Yes, custom ports. In a separate ports tree (only contains my custom ports). Same repository where everything else comes from.

Building a custom port takes a bit of effort at first (getting things correct), but in the long run it's easier to maintain.
 
Back
Top