Skip to content

Latest commit

 

History

History
83 lines (60 loc) · 1.92 KB

README.adoc

File metadata and controls

83 lines (60 loc) · 1.92 KB

OpenRC runscript for Spring Boot

This is OpenRC runscript for Java applications based on Spring Boot.

Requirements

  • OpenRC

  • Bash or Busybox’s ash (should work also with other POSIX shells)

  • socat (not necessary, just to check availability of a TCP port)

Installation

Alpine Linux

  1. 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.

  2. Install spring-boot-openrc:

 apk add spring-boot-openrc

Gentoo

  1. Add CTU’s Gentoo Overlay to your repos.conf or Layman (read howto).

  2. emerge -av dev-java/spring-boot-openrc

Manually

  1. Install socat (optional):

    emerge -av net-misc/socat  # on Gentoo
    apk add socat  # on Alpine
  2. Clone this repository and jump in:

    git clone https://github.com/jirutka/spring-boot-openrc.git
    cd spring-boot-openrc
  3. Install runscript and example config:

    ./install

    You may use variable DESTDIR to specify the target directories.

How to use

  1. Symlink runscript spring-boot-openrc for your application named e.g. myapp:

    cd /etc/init.d
    ln -s spring-boot-openrc myapp
  2. Configure runscript for myapp:

    cp /etc/conf.d/spring-boot-openrc myapp
    vim /etc/conf.d/myapp
  3. Start myapp:

    rc-service myapp start

License

This project is licensed under MIT License. For the full text of the license, see the LICENSE file.