Skip to content

sepe81/lvz-viz

 
 

Repository files navigation

lvz-viz

Build Status GitHub license Code Climate

Intro

Visualization of LVZ police ticker.

The official website is hosted at https://lvz-viz.leipzig.codefor.de by OK Lab Leipzig.

Usage

Build and run the app with npm, Grunt and Gradle.

The crawling and indexing of new articles is activated by default. It can be delayed by setting the startup parameter --app.initialDelay=<time in ms> to a high value (e.g. 1800000 for 30 minutes) or by setting an environment variable via export APP_INITIALDELAY=<time in ms>.

Profiles (dev|local|prod|test) can be set by the startup parameter --spring.profiles.active=<profile> or by setting an environment variable via export SPRING_PROFILES_ACTIVE=<profile>.

Please use the prod profile for production systems with a dedicated data volume (see docker-compose.prod.yml).

npm and Grunt

Use appropriate node and npm version via nvm.

nvm use

Download client js dependencies with npm and package them with Grunt.

npm install --no-progress
npm run grunt-build

Gradle

For local development and testing you need to startup elasticsearch via docker-compose.

docker-compose up -d elasticsearch

You can build and test an executable jar with gradle.

./gradlew build

You can run a specific test with gradle.

./gradlew test --tests *CrawlSchedulerTest

You can build an executable jar with gradle and run it as a separate process.

./gradlew assemble
java -jar build/libs/lvz-viz-*.jar --spring.profiles.active=local

Or you can simply run the project within gradle during development.

export SPRING_PROFILES_ACTIVE=local
./gradlew bootRun

Docker

You can build and run the app within a Docker container.

Required version for the multi-stage build: Docker 19.03+

-- Build or rebuild services
docker-compose build
-- Create and start containers
docker-compose up -d
-- Build services and start containers with dev profile
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build
-- Build services and start containers with prod profile
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build
-- View output from containers
docker-compose logs -f
-- Stop and remove containers, networks, images, and volumes
docker-compose down

Maintenance

-- Display dependency updates
./gradlew dependencyUpdates

Packages

No packages published

Languages

  • Java 43.2%
  • TypeScript 25.7%
  • HTML 12.8%
  • JavaScript 9.4%
  • Dockerfile 4.0%
  • CSS 2.6%
  • SCSS 2.3%