Skip to content

Instantly share code, notes, and snippets.

@jannylund
Last active March 9, 2016 08:41
Show Gist options
  • Save jannylund/0dbb60560478ed25480b to your computer and use it in GitHub Desktop.
Save jannylund/0dbb60560478ed25480b to your computer and use it in GitHub Desktop.
rpm for sbt-native-packaging
// SBT Native Packager
maintainer in Linux := "foo@bar.com"
packageSummary in Linux := "My app"
packageDescription := "My app"
rpmRelease := "1"
rpmVendor := "bar.com"
rpmUrl := Some("http://bar.com")
rpmLicense := Some("Commercial")
rpmGroup := Some("Applications/Server")
rpmAutoreq := "no"
javaOptions in Universal ++= Seq(
// Since play uses separate pidfile we have to provide it with a proper path
s"-Dpidfile.path=/var/run/${packageName.value}/play.pid",
// Use separate configuration file for production environment
s"-Dconfig.file=/usr/share/${packageName.value}/conf/production.conf",
// Use separate logger configuration file for production environment
s"-Dlogger.file=/usr/share/${packageName.value}/conf/logback-production.xml"
)
// SBT Native Packager
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.6")
Vagrant.configure(2) do |config|
config.vm.box = "bento/centos-7.1"
config.vm.network "forwarded_port", guest: 9000, host: 9000
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 1
end
# Generic setup
config.vm.provision :shell, inline: <<-SCRIPT
# Uncomment if you have time to update.
#yum update -y
# Add rpmforge, so we can have htop.
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
rpm -ihv rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
# Fix environment settings.
echo LC_ALL=en_US.UTF-8 | sudo tee -a /etc/environment
echo LANG=en_US.UTF-8 | sudo tee -a /etc/environment
yum install git zsh nano htop -y
sudo -u vagrant git clone git://github.com/robbyrussell/oh-my-zsh.git ~vagrant/.oh-my-zsh
#cp ~vagrant/.oh-my-zsh/templates/zshrc.zsh-template ~vagrant/.zshrc
sudo -u vagrant wget https://gist.githubusercontent.com/jannylund/1f2a8f6f67c74668c67f/raw/zshrc.zsh-template/ -O ~vagrant/.zshrc
chsh -s /bin/zsh vagrant
# Fix timezone
rm /etc/localtime && ln -s /usr/share/zoneinfo/Europe/Helsinki /etc/localtime
yum install java -y
SCRIPT
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment