Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 2.44 KB

README.md

File metadata and controls

100 lines (70 loc) · 2.44 KB

Commmit Craft API

Craft

Requirements

  • Java 17+
  • Docker
  • Gradle (You can use Gradle Wrapper)

Quick Start

  1. Clone the repository:
    git clone <repository-URL>
    cd <repository-name>
  2. add your deepl api-key to translate/src/main/resources/application.yml in key section
  3. Inside /gen with git bash write command ./build.sh (sometimes need before used chmod +x build.sh)

Other Start

  1. Clone the repository:

    git clone <repository-URL>
    cd <repository-name>
  2. Build the project using Gradle:

    ./gradlew build
  3. If you want to build the Docker image, use the following command:

    docker build -t commmit-craft .
  4. Run the Docker container:

    docker run -d -p 8090:8090 --name commmit-craft commmit-craft
  5. The application will be available at http://localhost:8090.

Translate Module Integration with DeepL

The translate module integrates with DeepL for machine translation. To use this feature, you need to provide your DeepL API key.

Setup API Key

  1. Go to the translate module’s application.properties (or application.yml) file.

  2. Add your DeepL API key in the configuration:

    deepl.api.key=YOUR_DEEPL_API_KEY
  3. Replace YOUR_DEEPL_API_KEY with your actual API key obtained from DeepL.

Configuration

You can specify different profiles for the application. For example, to use the dev profile:

  1. In application.yml:

    spring.profiles.active=dev
  2. Alternatively, you can pass the active profile as a Docker environment variable:

    docker run -d -p 8090:8090 -e SPRING_PROFILES_ACTIVE=kam --name commmit-craft commmit-craft

Docker Configuration

Dockerfile

The Docker image uses OpenJDK 17 and builds the application inside a Docker container. You can configure the profile or other settings when running the Docker container.

Exposed Port

By default, the application will run on port 8090. To change this, modify the application.properties:

server.port=8090

Running Tests

To run the tests for the application, use Gradle:

./gradlew test

Swagger documentation API

http://localhost:8090/swagger-ui/index.html

License

This project is licensed under the MIT License.