Skip to content

Simple Application with a postgres database, an automatic deployment for the jar with the application.

Notifications You must be signed in to change notification settings

jasonjente/dockerSpringBoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requires: - Docker with docker compose - A bash terminal - (possibly) mvn or other building tools How to run: Execute the bash script startApplication.sh .

This script will check for the base images and extend them. 

Then docker-compose will build the containers and then run them.

You can add your own database scripts that will run on the first initialization of the database. However, if there is an error during the ddl script execution, on the next startup these ddl's WILL NOT run again.

This Application can be a small template for Springboot applications in combination with Postgres. Just change the jar that will be uploaded as well as the ddl and the deployment will be ready in 0 time. ReST endpoints:

For the Product Entity:
    - GET localhost:8081/application/api/v1/rest/products/
    
    - GET localhost:8081/application/api/v1/rest/products/{productId}
    
    - GET localhost:8081/application/api/v1/rest/aproduct/
    
        returns:
    {
        "state": "IN_STOCK",
        "title": "IN_STOCK",
        "description": "IN_STOCK"
    }  

    - POST localhost:8081/application/api/v1/rest/products/ 
    
    {
        "state": "IN_STOCK",
        "title": "A TITLE",
        "description": "A DESCRIPTION"
    }

    - POST localhost:8081/application/api/v1/rest/products/{productId}
    
    {
        "state": "IN_STOCK",
        "title": "A TITLE",
        "description": "A DESCRIPTION"
    }
    
    
For the Orders Entity:

    - GET localhost:8081/application/api/v1/rest/orders/
    
    - GET localhost:8081/application/api/v1/rest/orders/{orderId}
    
    - GET localhost:8081/application/api/v1/rest/aorder/
    
        returns:
    {
        "orderId": null,
        "title": "IN_STOCK",
        "description": "IN_STOCK",
        "orderState": "IN_PROGRESS."
    } 

    - POST localhost:8081/application/api/v1/rest/orders/ 
    
    {
        "title": "IN_STOCK",
        "description": "IN_STOCK",
        "orderState": "IN_PROGRESS."
    }

    - POST localhost:8081/application/api/v1/rest/orders/{orderId}
    
    {
        "state": "IN_STOCK",
        "title": "A TITLE",
        "description": "A DESCRIPTION"
    }

About

Simple Application with a postgres database, an automatic deployment for the jar with the application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published