Need help with sbt-native-packager-examples?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

muuki88
224 Stars 54 Forks Apache License 2.0 72 Commits 4 Opened issues

Description

A set of sbt-native-pakager examples

Services available

!
?

Need anything else?

Contributors list

# 36,393
Scala
playfra...
angular...
C
51 commits
# 482,389
Scala
HTML
Shell
9 commits
# 444,761
Scala
Shell
interpo...
synchro...
2 commits
# 420,877
React
solidit...
ethereu...
Webpack
1 commit
# 421
C++
Electro...
Node.js
v8
1 commit
# 554,997
Scala
XML
Shell
1 commit

Goal

This is a small collection of sbt-native-packager examples. Each example is very small and should be easy to understand. Pick the ones you need and tailor your packaging process.

Not all examples are 100% tested. Just open an issue if something doesn't work

Examples

Currently all examples are tested for Debian only. Feel free to correct and contribute.

Application configuration

Your application has an external configuration, which you want to change and the application should pick up this changes.

Requirements

How it's done

Typesafe config uses the system property

config.file
to pass in a configuration location. So you don't need to add a folder to the classpath, which could be a potential security risk.

Project

You can find a working example at application-conf

Log4j configuration

This is related to the Application configuration. This time we use log4j.

Requirements

  • Linux OS (debian/rpm)
  • Log4j 2 (works in a similar way with 1.x)

How it's done

Log4j uses the system property

log4j.configurationFile
to pass in a configuration location. So you don't need to add a folder to the classpath, which could be a potential security risk.

Log4j 2 as also a cool auto reconfigurate feature, which can come in very handy.

Project

You can find a working example at log4j-conf

Custom Startup Parameters

A small example how to configure your startup parameters with SBT Native Packager. You'll see how to add java system properties and application arguments. We also change the

-Xmx
and
-Xms
settings.

Requirements

  • Linux OS (debian/rpm)

How it's done

Create a file

src/templates/etc-default
and fill it with the content you need.

Project

You can find a working example at startscript-parameters

Links

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.