Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jirutka/spring-boot-openrc

OpenRC init script for Java applications based on Spring Boot
https://github.com/jirutka/spring-boot-openrc

alpine-linux gentoo initscript linux openrc spring-boot

Last synced: 2 months ago
JSON representation

OpenRC init script for Java applications based on Spring Boot

Awesome Lists containing this project

README

        

= OpenRC runscript for Spring Boot
Jakub Jirutka
//custom
:name: spring-boot-openrc
:gh-name: jirutka/{name}

This is OpenRC runscript for Java applications based on http://projects.spring.io/spring-boot/[Spring Boot].

== Requirements

* https://wiki.gentoo.org/wiki/OpenRC[OpenRC]
* Bash or Busybox’s ash (should work also with other POSIX shells)
* http://www.dest-unreach.org/socat[socat] (not necessary, just to check availability of a TCP port)

== Installation

=== Alpine Linux

. Add `edge/testing` repository (e.g. http://dl-cdn.alpinelinux.org/alpine/edge/testing) to `/etc/apk/repositories`, if you don’t have it yet, and run `apk update`.
. Install https://pkgs.alpinelinux.org/package/edge/testing/x86_64/{name}[{name}]:

[source, sh, subs="verbatim, attributes"]
apk add {name}

=== Gentoo

. Add https://github.com/cvut/gentoo-overlay[CTU’s Gentoo Overlay] to your repos.conf or Layman (read https://github.com/cvut/gentoo-overlay#usage[howto]).
. `emerge -av dev-java/{name}`

=== Manually

. Install socat (optional):
+
[source, sh]
----
emerge -av net-misc/socat # on Gentoo
apk add socat # on Alpine
----

. Clone this repository and jump in:
+
[source, sh, subs="verbatim, attributes"]
----
git clone https://github.com/{gh-name}.git
cd {name}
----

. Install runscript and example config:
+
./install
+
You may use variable `DESTDIR` to specify the target directories.

== How to use

. Symlink runscript `{name}` for your application named e.g. `myapp`:
+
[source, sh, subs="verbatim, attributes"]
----
cd /etc/init.d
ln -s {name} myapp
----

. Configure runscript for `myapp`:
+
[source, sh, subs="verbatim, attributes"]
----
cp /etc/conf.d/{name} myapp
vim /etc/conf.d/myapp
----

. Start myapp:
+
rc-service myapp start

== License

This project is licensed under http://opensource.org/licenses/MIT/[MIT License].
For the full text of the license, see the link:LICENSE[LICENSE] file.