-
Notifications
You must be signed in to change notification settings - Fork 0
installation instructions
To clone the project repository, follow these steps:
- Clone the GitHub repository and navigate to the project directory:
git clone https://github.com/33mestre/java_base.git
cd java_base
chmod +x index.sh
chmod +x scripts/*.shThe project is designed to run seamlessly with Docker. The provided scripts handle the installation and execution of Docker containers. If Docker is not installed, the scripts will handle the installation process.
To run the project using Docker, execute the index.bat script for Windows or the index.sh script for Linux and Mac. These scripts will open a console terminal with the following main menu:
Console Terminal
Main Menu
---------------------------------
echo "Selecione uma opção:"
echo "[1] - Server"
echo "[2] - Console"
echo "[3] - DB"
echo "[4] - Directory"
echo "[5] - Changelog"Each option in the menu calls the corresponding script that manages the specific Docker container:
- Server: Java Spring Server on port 80 and H2 DB Server on port 8092.
- Console: Docker environment to run a Java console application, allowing testing of the Currency Conversion API application.
- DB: DB Tester Installation and Execution Script (SELECT CURRENCY_CONVERSIONS from H2 DB).
- Directory: Script to generate the DIRECTORY.md file.
-
Changelog: Script that:
- Obtains the list of Git commits in the format: hash, date, author, and message.
- Defines and increments the project version according to the commits.
- Updates the 'CHANGELOG.md' file with a detailed log of all changes.
- Updates the '.env' file with the new project version.
- Ignores commits containing the keyword "AUTO_COMMIT".
-
Internationalization: The scripts read from the
project.propertiesfile to determine the language settings using thei18nkey. - Property Checks: The scripts check for the existence of necessary property files and keys.
- Script Existence Checks: Before running, each script verifies the existence of the required files.
To run the project without Docker, ensure you have the following installed:
- Java 17 or higher
- Maven
- Python
- Groovy
- Clone the repository:
git clone https://github.com/33mestre/java_base.git
cd java_base- Install dependencies:
mvn clean install- Run the application:
mvn spring-boot:runYou can use any Java IDE like Eclipse, IntelliJ IDEA, or VS Code to import the project using the pom.xml file.
Currency Conversion API - Console Terminal This script provides a console terminal menu for managing the Currency Conversion API project. It performs the following steps:
- Checks for the existence of the project.properties file.
- Reads the i18n key from project.properties to determine the language.
- Loads the corresponding internationalization file for messages.
- Displays a menu with options to run various project scripts.
- Verifies the existence of each script before attempting to run it.
- Verifies the existence of properties in the i18n file. Each option in the menu calls the corresponding script that manages the specific Docker container:
- [1] Server: Java Spring Server on port 80 and H2 DB Server on port 8092.
- [2] Console: Docker environment to run a Java console application, allowing testing of the Currency Conversion API application.
- [3] DB: DB Tester Installation and Execution Script (SELECT CURRENCY_CONVERSIONS from H2 DB).
- [4] Directory: Script to generate the DIRECTORY.md file.
- [5] Changelog: Script that:
- Obtains the list of Git commits in the format: hash, date, author, and message.
- Defines and increments the project version according to the commits.
- Updates the 'CHANGELOG.md' file with a detailed log of all changes.
- Updates the '.env' file with the new project version.
- Ignores commits containing the keyword "AUTO_COMMIT".
Currency Conversion API - Project changelog generation script with i18n support
This script generates the project's changelog by setting up a Docker environment. It performs the following steps:
- Checks for the existence of the project.properties file.
- Reads the i18n key from project.properties to determine the language.
- Loads the corresponding internationalization file for messages.
- Verifies Docker installation and ensures the Docker daemon is running.
- Checks for and creates a Docker network if necessary.
- Packages the project into a Docker image.
- Runs a Docker container to generate the project changelog.
Calls changelog-docker.yml Dockerfile
The changelog-docker.yml Dockerfile is responsible for:
- Setting up a Docker environment to run a Groovy application
- For the purpose of generating the project's changelog.
Currency Conversion API - Project installation and execution script with i18n support
This script sets up and runs the Currency Conversion API application in a Docker environment. It performs the following steps:
- Checks for the existence of the project.properties file.
- Reads the i18n key from project.properties to determine the language.
- Loads the corresponding internationalization file for messages.
- Verifies Docker installation and installs it if necessary.
- Ensures the Docker daemon is running.
- Checks for and creates a Docker network if necessary.
- Packages the project into a Docker image.
- Runs a Docker container to execute the Currency Conversion API application.
Calls console-app-docker.yml Dockerfile
The console-app-docker.yml Dockerfile is responsible for:
- Setting up a Docker environment to run a Java console application
- Allowing the testing of the Currency Conversion API application.
This script sets up and runs the DB Tester for the Currency Conversion API application in a Docker environment. It performs the following steps:
- Checks for the existence of the project.properties file.
- Reads the i18n key from project.properties to determine the language.
- Loads the corresponding internationalization file for messages.
- Verifies Docker installation and installs it if necessary.
- Ensures the Docker daemon is running.
- Checks for and creates a Docker network if necessary.
- Packages the DB Tester project into a Docker image.
- Runs a Docker container to execute the DB Tester, which:
- Installs, configures, and starts the H2 Database server.
- Runs a Java program that performs a SELECT query on the CURRENCY_CONVERSIONS table in the H2 database.
Calls db-docker.yml Dockerfile
The db-docker.yml Dockerfile is responsible for:
- Installing, configuring, and starting the H2 Database server
- Running a Java program that performs a SELECT query on the CURRENCY_CONVERSIONS table in the H2 database.
This script sets up and runs the generation of the DIRECTORY.md file for the Currency Conversion API project in a Docker environment. It performs the following steps:
- Checks for the existence of the project.properties file.
- Reads the i18n key from project.properties to determine the language.
- Loads the corresponding internationalization file for messages.
- Verifies Docker installation and exits if not found.
- Ensures the Docker daemon is running.
- Checks for and creates a Docker network if necessary.
- Stops and removes any existing Docker container named "directory".
- Packages the project into a Docker image using directory-docker.yml.
- Adds execution permission to the script inside the container.
- Runs a Docker container to generate the DIRECTORY.md file.
Calls directory-docker.yml Dockerfile
The directory-docker.yml Dockerfile is responsible for:
- Generating the project DIRECTORY.md
Currency Conversion API - Unix / Linux Version Server Installation and Execution Script
- Java Spring Server - port 8080
- H2 DB Server - port 8092
This script sets up and runs the server environment for the Currency Conversion API project in a Docker container. It performs the following steps:
- Checks for the existence of the project.properties file.
- Reads the i18n key from project.properties to determine the language.
- Loads the corresponding internationalization file for messages.
- Verifies Docker installation and installs it if necessary.
- Ensures the Docker daemon is running.
- Checks for and creates a Docker network if necessary.
- Stops and removes any existing Docker container named "shelson-app".
- Packages the project into a Docker image using Dockerfile.
- Runs the Docker container with the server on port 8080.
To run the project without Docker, ensure you have the following installed:
- Java 17 or higher
- Maven
- Python
- Groovy
- Clone the repository:
git clone https://github.com/33mestre/java_base.git
cd java_base- Install dependencies:
mvn clean install- Run the application:
mvn spring-boot:runYou can use any Java IDE like Eclipse, IntelliJ IDEA, or VS Code to import the project using the pom.xml file.
- Overview: Presentation of the project, highlighting its purpose and the context in which it is embedded.
- Project Objectives: Enumeration of the main objectives that the project aims to achieve.
- Scope and Functionalities: Description of the main functionalities offered by the project and its scope of operation.
- Initial Configurations: Steps required to set up the development or production environment.
- Installation Instructions.
- Docker Configuration: Specifications on how to configure and use Docker for the project.
- Folder Structure: Description of the organization of the project directories.
- Project Architecture: Explanation of the architecture used, including design patterns and technical decisions.
- Development Flow: Description of the development process adopted, including planning, coding, and review stages.
- Apache Camel Integration: Guide on integrating Apache Camel into the project, including configuration and usage.
- Contributors and Authors: Recognition of the contributors to the project.
- Contributions: Guidelines on how to contribute to the project, including code standards and pull request requirements, tips and best practices.
- Code of Conduct: Behavioral guidelines expected for the project community.
- OpenAPI Specification: Details about the OpenAPI specification used to document the API endpoints.
- API Documentation with Swagger: Information on how to access and use the interactive API documentation generated by Swagger.
- Javadoc Documentation: Information on the Javadoc documentation generated for the project.
- Endpoint Description: Details of the available API endpoints, including methods, parameters, and usage examples.
- Database Management: Strategies and practices for efficient management of the database used by the project.
- Testing Strategies: Approach and methods used to test the software, including unit, integration, and E2E tests.
- Testing Tools: Description of the testing tools used in the project and how to configure them.
- CI/CD Pipeline: Explanation of the continuous integration and delivery pipeline, detailing each stage and its function.
- Automations and Artifact Generation: Description of the automations incorporated into the CI/CD, including documentation generation and build artifacts.
- .gitignore, .editorconfig and project.properties: Utility of these files to maintain code consistency and quality.
- Maven Wrapper and application.properties: Explanation of how these files help standardize the development environment.
- .env File and Travis CI Settings: Use of these files to configure the environment and CI integrations.
- Code Standards and Security: Guidelines for maintaining code quality and security.
- Monitoring and Logging Practices: Recommended techniques for monitoring and logging in the project.
- Licensing: Information about the rights and restrictions associated with the use of the software.
- Terms of Use: Information about the terms and conditions for using the software.
- Future Plans: Discussion on functionalities and improvements considered for future versions of the project.
- Improvement Proposals: Space for the community to suggest and debate improvements and innovations.
- External Links and References: Additional resources and external documentation relevant to the project.
- Security Policy: Details on the supported versions, reporting vulnerabilities, and general security practices.