-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Debian configuration to have a clean Upstart and Systemd boot
new file: .debian.build.conf.example modified: .gitignore new file: Makefile modified: build.sbt new file: project/DebianProperties.scala
- Loading branch information
Francois Bayart
committed
Apr 5, 2016
1 parent
d838c0d
commit 1e773ad
Showing
5 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
debian { | ||
maintainer = "Francois Bayart <[email protected]>" | ||
server_loading = "Upstart" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
.akka-cookie | ||
.main.build.conf | ||
.docker.build.conf | ||
.debian.build.conf | ||
project/target/ | ||
target/ | ||
logs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
SHELL=/bin/bash | ||
|
||
help: ## This help dialog. | ||
@IFS=$$'\n' ; \ | ||
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \ | ||
printf "%-30s %s\n" "target" "help" ; \ | ||
printf "%-30s %s\n" "------" "----" ; \ | ||
for help_line in $${help_lines[@]}; do \ | ||
IFS=$$':' ; \ | ||
help_split=($$help_line) ; \ | ||
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \ | ||
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \ | ||
printf '\033[36m'; \ | ||
printf "%-30s %s" $$help_command ; \ | ||
printf '\033[0m'; \ | ||
printf "%s\n" $$help_info; \ | ||
done | ||
|
||
all: help | ||
|
||
run: ## start server with mode DEV on port 9002 | ||
sbt ~run -Dhttp.port=9000 # -Dconfig.file=/FULL PATH TO YOUR LOCAL DEV CONF FILE/dev.conf | ||
|
||
console: ## start console | ||
sbt console | ||
|
||
package: ## create Debian package | ||
sbt debian:packageBin | ||
|
||
secret: ## Get a new secret key (not saved) | ||
sbt playGenerateSecret | ||
|
||
check: ## check Scala style | ||
sbt scalastyle | ||
|
||
scalastyleconfig: ## Generate configuration for scalastyle | ||
sbt scalastyleGenerateConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
import com.typesafe.sbt.packager.archetypes.ServerLoader.{SystemV, Upstart, Systemd} | ||
|
||
object DebianProperties extends BuildConf { | ||
val fileName = ".debian.build.conf" | ||
|
||
val maintainer = getString("debian.maintainer", "Andy Petrella <[email protected]>") | ||
|
||
val serverLoading = getString("debian.server_loading", "Systemd") match { | ||
case "Systemd" => Systemd | ||
case "SystemV" => SystemV | ||
case "Upstart" => Upstart | ||
} | ||
|
||
} |