Skip to content

AlexRogalskiy/ws-documents

Web-Documents

Build Create Release Lines of code GitHub release (latest by date) GitHub closed issues GitHub closed pull requests Github All Contributors GitHub repo size GitHub last commit GitHub GitHub All Releases GitHub language count GitHub search hit counter GitHub Repository branches GitHub Repository dependents Docker Automated build Docker Pulls Quality Gate Status Run Status

Summary

Web service intended to provide operations on documents (create, edit, fetch document's data and generate file in docx format by template)

Description

Application can be used for creating and editing document's data with possibility to generate final DocX-document by template

Compile

For JDK 8

mvnw clean install spring-boot:repackage -Pnon_module_java,test-jar,xsd -DskipTests

to build image to Docker daemon:

mvnw clean install -Pnon_module_java,test-jar,xsd,jib -DskipTests

For JDK 11

mvnw clean install spring-boot:repackage -Pmodule_java,test-jar,xsd,jib -DskipTests

building image to Docker daemon:

mvnw clean package -Pmodule_java,test-jar,xsd,jib -DskipTests

buidling and deploying docker image to DockerHub:

mvnw -s settings.xml clean package -Pmodule_java,test-jar,xsd,jib -DskipTests -Denv.DOCKERHUB_USERNAME=<username> -Denv.DOCKERHUB_PASSWORD=<password>

run local build/deployment process:

skaffold config set --global local-cluster true
skaffold dev --trigger notify

Run with Skaffold

In order to run the ws-documents service using skaffold, you need to have the DocumentDB up and running:

1. Start the document DB (postgres):

skaffold run -p documents-db-local

2. Start the ws-documents service:

skaffold run -p local

Run with containerized PostgreSQL

Run PostgreSQL in docker-container via command:

docker run --name db-postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password -e POSTGRES_DB=documentdb -p 5432:5432 -d postgres
cd ${project.build.directory}/repackage
java -jar com.sensiblemetrics.api.ws-document-generator-0.1.0-SNAPSHOT-exec.jar

where

project.build.directory=modules/document-generator/.build/bin/com.sensiblemetrics.api.ws.document.generator

or simply run:

scripts/run.bat

Deploy with Kubectl

1. Start the document service:

kubectl run spring-boot-jib --image=$IMAGE --port=8080 --restart=Never

2. Wait until pod is up and running:

kubectl port-forward spring-boot-jib 8080

Download Docker image (RegistryHub)

docker pull alexanderr/ws-documents:0.1.0-SNAPSHOT

Usage

Choose one of the modules and add to your pom.xml

<dependency>
    <groupId>com.sensiblemetrics.api.ws</groupId>
    <artifactId>{module.artifactId}</artifactId>
    <version>{lib.version}</version>
</dependency>

Bundle with all WebDocs dependencies:

  • WebDocs All
    webdocs-all - Library to work with WebDocs API.

WebDocs module dependencies:

Version Store

./pom.xml

Miscellaneous

You can find more useful libs and examples on wiki

Authors

WS-Documents is maintained by:

with community support please contact with us if you have some question or proposition.

Team Tools

alt tag

SensibleMetrics Team would like inform that JetBrains is helping by provided IDE to develop the application. Thanks to its support program for an Open Source projects!

alt tag

SensibleMetrics WS-Documents project is using SonarCloud for code quality. Thanks to SonarQube Team for free analysis solution for open source projects.

License

SensibleMetrics WS-Documents is distributed under LGPL version 3 or later, see COPYING.LESSER(LGPL) and COPYING(GPL).
LGPLv3 is additional permissions on top of GPLv3.

image