Git Product home page Git Product logo

beagen's Introduction

Java CI with Maven Docker

Beagen: A Beacon file generator for Deutsche Digitale Bibliothek

A Beacon file generator for Deutsche Digitale Bibliothek. For more information about Beacon files see this draft.

Visit Beagen at DDBlabs: https://labs.ddb.de/app/beagen

See also

Screenshot

Screenshot of Beagen

Docker

Beagen is available as Docker container at GitHub. To run the container execute:

docker run -d -p 8080:8080 -P \
    --env "beagen.baseurl=http://localhost/" \
    --env "beagen.cron=0 0 12 * * ?" \
    --env "beagen.database.dir=files/database/" \
ghcr.io/mbuechner/beagen/beagen:latest

Note: beagen.database.dir should be a directory inside a Docker volume. If not all data will be lost on restart.

Environment variables

Variable Description
beagen.baseurl Base url of Beagen application. Mainly used to build URLs in the Beacon file headers.
beagen.cron How often should the Job run and check for updates at DDB (Quartz documentation).
beagen.database.dir Directory for the database files (Apache Derby)

Container build

If you like to build the Docker container by yourself, please follow these steps. (Not necessary if you use the pre-build container at GitHub.)

  1. Checkout GitHub repository: git clone https://github.com/mbuechner/beagen
  2. Go into folder: cd beagen
  3. Run docker build -t beagen .
  4. Start container:
    docker run -d -p 8080:8080 -P \
        --env "beagen.baseurl=http://localhost/" \
        --env "beagen.cron=0 0 12 * * ?" \
        --env "beagen.database.dir=files/database/" \
    beagen
    
  5. Open browser: http://localhost:8080/

Docker stack

If you're using Docker Stack to deploy application, this could be a possible configuration file in YAML.

version: '2'
services:
  beagen:
    image: ghcr.io/mbuechner/beagen/beagen:latest
    volumes:
      - beagen:/home/beagen/files
    environment:
      - "beagen.baseurl=https://example.com/beagen/"
      - "beagen.cron=0 0 12 * * ?"
      - "beagen.database.dir=/home/beagen/files/database/"
    ports:
      - "8080"
    restart: always
volumes:
  beagen:

Maven

It's a maven project comming with build-in Jetty web server (Javalin). To build this project locally without using Docker, run inside the direcory with pom.xml:

mvn clean package

This will build a fat-jar with all dependencies. To run the webserver type:

java -jar target/beagen.jar

It'll run locally under: http://localhost:8080/

beagen's People

Contributors

mbuechner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.