Giter Site home page Giter Site logo

ayazkhuraishi / camunda-postgrest-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from npdeehan/camunda-postgrest-example

0.0 0.0 0.0 10 KB

This is an example of how to connect a postgres database to a Camunda Spring Boot application

Java 83.72% HTML 16.28%

camunda-postgrest-example's Introduction

Camunda Spring Boot Application

Spring Boot Application using Camunda.

This is a simple example which shows how you can connect Camunda to a postgres database.

How does it work?

Runing a Postgres Database

If you don't already have a postgres database up and running you do so by installing docker and using the docker-compose.yml file in the resources folder.

To start the database simple navegate to the directory ../src/main/resources and run docker-compose up

That will download a postgres image from docker hub and start it up. Once it's finished you'll have a postgres database with the following settings:

 environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: postgres
    ports:
      - 5432:5432

Connecting Camunda to the Database

Connecting the database involves two changes, firstly you have to define the datasource in the application.yaml file.

spring.datasource:
   type: org.postgresql.ds.PGSimpleDataSource
   username: postgres
   password: postgres
   url: jdbc:postgresql://localhost:5432/postgres

Then you should get the driver by adding this dependency to your pom.xml

<dependency>
	<groupId>org.postgresql</groupId>
	<artifactId>postgresql</artifactId>
</dependency>

Running the application

You can also build and run the process application with Spring Boot.

Manually

  1. Build the application using:
mvn clean package
  1. Run the *.jar file from the target directory using:
java -jar target/Camunda-Postgrest-Example.jar

For a faster 1-click (re-)deployment see the alternatives below.

Maven Spring Boot Plugin

  1. Build and deploy the process application using:
mvn clean package spring-boot:run

Your Java IDE

  1. Run the project as a Java application in your IDE using CamundaApplication as the main class.

Run and Inspect with Tasklist and Cockpit

Once you deployed the application you can run it using Camunda Tasklist and inspect it using Camunda Cockpit.

Environment Restrictions

Built and tested against Camunda Platform version 7.15.0.

License

Apache License, Version 2.0.

camunda-postgrest-example's People

Contributors

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