/spring-archetype

Simple template for typical spring projects

Primary LanguageJava

Demo

This repository is a template that provides the bottomline requirement in simple spring projects. It gives you a significant distance ahead the kick off of every typical spring application. It name demo is the default name of spring applications. You can run this application in you github codespace or on your local machine by running the task log in vscode tasks. The final goal of this project is to turn it into a maven archetype.

Useful commands

  1. Build the project with certain profile

    mvn clean package -Pprod
    
    mvn clean package -Pdev
    
  2. Run the project with certain profile

    mvn spring-boot:run -Pprod
    
    mvn spring-boot: run -Pdev
    
  3. Build docker image

    docker build --pull --rm -f "src/main/resources/docker/prod/dockerfile.prod" -t demo:prod-1.0 "src/.." 
    
    docker build --pull --rm -f "src/main/resources/docker/dev/dockerfile.dev" -t demo:dev-1.0 "src/.." 
    
  4. Run docker composer

    docker compose -f "src/main/resources/docker/prod/prod.docker-compose.yml" up -d --build 
    
    docker compose -f "src/main/resources/docker/dev/dev.docker-compose.yml" up -d --build 
    

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

made with ❤️ by kotbi abderrahmane