-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
69 lines (57 loc) · 2.57 KB
/
Copy pathbuild.sbt
File metadata and controls
69 lines (57 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import com.typesafe.sbt.packager.archetypes.ServerLoader.Systemd
import com.typesafe.sbt.SbtNativePackager.autoImport._
import DebianConstants._
name := """workshop-registration"""
version := "1.2"
lazy val root = (project in file(".")).enablePlugins(PlayScala, DebianPlugin)
scalaVersion := "2.11.6"
resolvers += "Atlassian Releases" at "https://maven.atlassian.com/public/"
libraryDependencies ++= Seq(
"org.scalatestplus" % "play_2.11" % "1.4.0-M4"% Test,
cache,
ws,
specs2 % Test,
"com.typesafe.play" %% "play-slick" % "1.1.1",
"com.typesafe.play" %% "play-slick-evolutions" % "1.1.1",
"com.mohiva" %% "play-silhouette" % "3.0.4",
"com.adrianhurt" %% "play-bootstrap3" % "0.4.5-P24",
"com.mohiva" %% "play-silhouette-testkit" % "3.0.4" % Test,
"net.codingwell" %% "scala-guice" % "4.0.0",
"net.ceedubs" %% "ficus" % "1.1.2",
"com.h2database" % "h2" % "1.4.177",
"org.xerial" % "sqlite-jdbc" % "3.8.11.2",
"org.apache.pdfbox" % "pdfbox" % "2.0.0-RC3",
"org.seleniumhq.selenium" % "selenium-java" % "2.53.1" % Test
)
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator
// use different configuration for tests
javaOptions in Test += "-Dconfig.file=conf/application.test.conf"
// Debian package
enablePlugins(JDebPackaging)
enablePlugins(JavaAppPackaging)
enablePlugins(JavaServerAppPackaging)
serverLoading in Debian := Systemd
maintainer in Linux := "Foo Bar <foo.bar@example.com>"
packageSummary in Linux := "Workshop Registration"
packageDescription := "Workshop Registration"
daemonUser in Linux := "wsreg"
daemonGroup in Linux := "wsreg"
debianPackageDependencies in Debian ++= Seq("java8-runtime", "sqlite3")
import DebianConstants._
maintainerScripts in Debian := maintainerScriptsAppend((maintainerScripts in Debian).value)(
Postinst -> {
// create database directory
"mkdir -p /var/lib/workshop-registration\n" +
"chown ${{daemon_user}}:${{daemon_group}} /var/lib/workshop-registration\n" +
// generate aplication secret
"echo play.crypto.secret=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 64` >> /etc/workshop-registration/application.prod.conf\n" +
// restart
"restartService ${{app_name}}\n"
}
)
javaOptions in Universal += "-Dpidfile.path=/var/run/workshop-registration/play.pid"
javaOptions in Universal += "-Dconfig.file=conf/application.prod.conf"
javaOptions in Universal += "-Djava.net.preferIPv4Stack=true"