Skip to content

Commit

Permalink
Disable deployment task for now. Add a docker-compose file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Grogs committed Sep 9, 2017
1 parent 8bbbf61 commit dfcd108
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
30 changes: 14 additions & 16 deletions build.sbt
Expand Up @@ -67,22 +67,20 @@ lazy val server = project.settings(
"org.webjars" %% "webjars-play" % "2.6.0-M1",
"org.webjars" % "font-awesome" % "4.5.0"
),
compile in Compile := ((compile in Compile) dependsOn scalaJSPipeline).value,

deploy := {

val v = version.value
val dockerImage = (dockerAlias in Docker).value.versioned
val dokkuApp = "fulfilmed"

val pull = s"docker pull $dockerImage"
val tag = s"docker tag $dockerImage dokku/$dokkuApp:$v"
val deploy = s"dokku tags:deploy $dokkuApp $v"

val status = Process("ssh", Seq("root@fulfilmed.com", s"$pull && $tag && $deploy")) !

if (status != 0) throw new IllegalArgumentException("Deploy failed.")
}
compile in Compile := ((compile in Compile) dependsOn scalaJSPipeline).value
// deploy := {
//
// val v = version.value
// val dockerImage = (dockerAlias in Docker).value.versioned
// val dokkuApp = "fulfilmed"
//
// val pull = s"docker pull $dockerImage"
// val deploy = s"dokku tags:deploy $dokkuApp $v"
//
// val status = Process("ssh", Seq("root@fulfilmed.com", s"$pull && $deploy")) !
//
// if (status != 0) throw new IllegalArgumentException("Deploy failed.")
// }
)
.enablePlugins(PlayScala, GitVersioning)
.disablePlugins(PlayLayoutPlugin)
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,14 @@
version: "3"
services:
cache:
image: redis
web:
image: grogs/fulfilmed:1.6
deploy:
replicas: 2
restart_policy:
condition: on-failure
ports:
- "9000:9000"
depends_on:
- cache
2 changes: 1 addition & 1 deletion project/plugins.sbt
Expand Up @@ -9,4 +9,4 @@ addSbtPlugin("com.vmunier" % "sbt-web-scalajs" % "1.0.3")

addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC3")

addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.3")

0 comments on commit dfcd108

Please sign in to comment.