Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit d0b977b

Browse files
authored
Merge pull request #54 from noobdevsam/25-modify_readme_for_docker_instructioins
merge from branch 25
2 parents 2ad1313 + 6ecd8ca commit d0b977b

File tree

2 files changed

+28
-27
lines changed

2 files changed

+28
-27
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
![Spring Boot](https://img.shields.io/badge/Spring_Boot-3.x-brightgreen.svg)
55
![License](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)
66

7-
This project is a powerful and secure steganography tool built with Spring Boot 3. It allows you to hide text messages or files within images using the Least Significant Bit (LSB) technique. The application provides a RESTful API for all its operations, supports robust AES-256 encryption for hidden data, and is optimized for production with GraalVM native image support and Java Virtual Threads.
7+
This project is a powerful and secure steganography tool built with Spring Boot 3. It allows you to hide text messages or files within images using the Least Significant Bit (LSB) technique. The application provides a RESTful API for all its operations, supports robust AES-256 encryption for hidden data, and is optimized for production with Java Virtual Threads.
88

99
## Table of Contents
1010

@@ -22,7 +22,7 @@ This project is a powerful and secure steganography tool built with Spring Boot
2222
- [Configuration](#configuration)
2323
- [Running the Application](#running-the-application)
2424
- [1. For Local Development (JVM)](#1-for-local-development-jvm)
25-
- [2. For Production (Native Docker Image)](#2-for-production-native-docker-image)
25+
- [2. For Production (Docker Image)](#2-for-production-docker-image)
2626
- [Interacting with the API](#interacting-with-the-api)
2727
- [Example 1: Estimate Capacity](#example-1-estimate-capacity)
2828
- [Example 2: Encode a Text Message](#example-2-encode-a-text-message)
@@ -40,7 +40,7 @@ Steganography is the practice of concealing a message or file within another fil
4040
- **Text & File Steganography**: Embed both plain text and binary files within images.
4141
- **Strong Encryption**: All hidden data is encrypted with **AES-256 (CBC mode)**. The encryption key is derived from your password using **PBKDF2 with 65,536 iterations** and a unique salt for each encoding.
4242
- **RESTful API**: A comprehensive API for encoding, decoding, capacity estimation, and managing encodings.
43-
- **GraalVM Native Image Support**: Build a lightweight, fast-starting native executable container using the integrated Spring Boot Maven plugin and Cloud Native Buildpacks.
43+
- **Docker Support**: Build and run the application as a container using the integrated Spring Boot Maven plugin and Docker Compose.
4444
- **High-Concurrency Ready**: Utilizes **Java 25 Virtual Threads** with an embedded Jetty server to efficiently handle a large number of concurrent requests.
4545
- **Large File Streaming**: Efficiently encodes and encrypts large files by streaming them, keeping memory usage low.
4646
- **Capacity Estimation**: A dedicated endpoint to check if your data will fit in a given image before performing the encoding.
@@ -76,7 +76,6 @@ Steganography is the practice of concealing a message or file within another fil
7676
## Technology Stack
7777

7878
- **Java 25** & **Spring Boot 3**
79-
- **GraalVM**: For building the native executable.
8079
- **Spring Framework**: Web, Data JPA, Jetty (for Virtual Threads).
8180
- **Database**: MySQL.
8281
- **Build & Packaging**: Maven, Spring Boot Buildpacks.
@@ -151,22 +150,24 @@ This method is ideal for development and debugging, as it uses Spring Boot's hot
151150
```
152151
The application will start on `http://localhost:8080`.
153152

154-
### 2. For Production (Native Docker Image)
153+
### 2. For Production (Docker Image)
155154

156-
This is the recommended approach for production. It compiles the application into a native executable and packages it into a minimal, secure Docker container.
155+
This is the recommended approach for production. It packages the application into a standard JVM-based Docker container.
157156

158-
1. **Build the Native Docker Image**:
159-
Run the following Maven command. This uses Cloud Native Buildpacks to compile a native executable and create a Docker image named `noobdevsam/spring-project-steganography-tool:0.0.1-SNAPSHOT`.
157+
1. **Build the Docker Image**:
158+
Run the following Maven command. This uses Cloud Native Buildpacks to create a Docker image named `noobdevsam/spring-project-steganography-tool:0.0.1-SNAPSHOT`.
160159
```bash
161-
# This command can take several minutes and requires Docker to be running.
162-
./mvnw spring-boot:build-image -Pnative -DskipTests
160+
# This command requires Docker to be running.
161+
./mvnw spring-boot:build-image -DskipTests
163162
```
164163

165164
2. **Run with Docker Compose**:
166165
Once the image is built, start the application and the database using Docker Compose.
167166
```bash
168167
# This will use the image built in the previous step.
169168
docker compose up
169+
or
170+
docker compose up -d db-mysql && docker compose up app
170171
```
171172
The application will be available on `http://localhost:8080`.
172173

compose.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
services:
2+
# Database Service
3+
db-mysql:
4+
image: mysql:latest
5+
container_name: db-mysql
6+
ports:
7+
- "3306:3306"
8+
environment:
9+
- MYSQL_ROOT_PASSWORD=password
10+
- MYSQL_DATABASE=stego
11+
- MYSQL_USER=user
12+
- MYSQL_PASSWORD=password
13+
volumes:
14+
- mysql_data:/var/lib/mysql
15+
networks:
16+
- stego-network
17+
218
# Application Service
319
app:
420
# Use the image built by the Spring Boot Maven plugin
@@ -21,22 +37,6 @@ services:
2137
depends_on:
2238
- db-mysql
2339

24-
# Database Service
25-
db-mysql:
26-
image: mysql:latest
27-
container_name: db-mysql
28-
ports:
29-
- "3306:3306"
30-
environment:
31-
- MYSQL_ROOT_PASSWORD=password
32-
- MYSQL_DATABASE=stego
33-
- MYSQL_USER=user
34-
- MYSQL_PASSWORD=password
35-
volumes:
36-
- mysql_data:/var/lib/mysql
37-
networks:
38-
- stego-network
39-
4040
networks:
4141
stego-network:
4242
driver: bridge
@@ -45,4 +45,4 @@ volumes:
4545
mysql_data:
4646
driver: local
4747
storage_data:
48-
driver: local
48+
driver: local

0 commit comments

Comments
 (0)