From 2ede5fbf1fa26b330d2107b6026ed347b49f02d6 Mon Sep 17 00:00:00 2001 From: aj-nife <79135943+aj-nife@users.noreply.github.com> Date: Fri, 16 Jun 2023 18:53:11 +0530 Subject: [PATCH 1/8] Update Dockerfile --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index f2af883..61842d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,18 @@ # Use an official OpenJDK runtime as a parent image -FROM openjdk:8-jre-alpine +FROM maven:3-jdk-8-alpine # set shell to bash # source: https://stackoverflow.com/a/40944512/3128926 RUN apk update && apk add bash -# Set the working directory to /app -WORKDIR /app +WORKDIR /sources -# Copy the fat jar into the container at /app -COPY /target/docker-java-app-example.jar /app +COPY * /sources + +RUN cd /sources && mvn clean package dependency:copy-dependencies # Make port 8080 available to the world outside this container EXPOSE 8080 # Run jar file when the container launches -CMD ["java", "-jar", "docker-java-app-example.jar"] \ No newline at end of file +CMD ["java", "-jar", "target/docker-java-app-example.jar"] From 10e25c58c549b5ad860dd120f7299d07477d7b4d Mon Sep 17 00:00:00 2001 From: aj-nife <79135943+aj-nife@users.noreply.github.com> Date: Fri, 16 Jun 2023 19:14:30 +0530 Subject: [PATCH 2/8] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 61842d4..5b9d9a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /sources COPY * /sources -RUN cd /sources && mvn clean package dependency:copy-dependencies +RUN cd /sources && mvn clean package # Make port 8080 available to the world outside this container EXPOSE 8080 From aa08a5e4b4a03fec2b36378e80b70eeca10a2eb2 Mon Sep 17 00:00:00 2001 From: Devraj patil Date: Fri, 10 Apr 2026 04:22:28 +0530 Subject: [PATCH 3/8] updated readme with nife,nifectl deployment instructions --- README.md | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 208 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a609c96..a37ccd3 100644 --- a/README.md +++ b/README.md @@ -378,4 +378,211 @@ C:\00_ANA\JavaEE\WS\docker-java-app-example> ``` -[Go back to TOC](#toc) \ No newline at end of file +[Go back to TOC](#toc) + +## Deployment on NIFE + +Deploy your Spring Boot application using the NIFE UI: + +**Source → Build → Resources → Review → Deploy** + +--- + +### Method 1: Docker Image (Recommended) + +#### Step 1: Build & Push Image + +```bash +docker build -t springboot-docker-app . +docker tag springboot-docker-app /springboot-docker-app:latest +docker push /springboot-docker-app:latest +``` + +--- + +#### Step 2: Configure in NIFE + +* Source → Docker Image +* Image → `/springboot-docker-app:latest` + +**Ports** + +* Internal → `8080` +* External → `80` + +--- + +#### Step 3: Resources + +* Select Region (e.g., `ap-south-1`) + +**Recommended** + +* CPU → 250m–500m +* Memory → 512MB–1GB +* Replicas → 1–2 + +--- + +#### Step 4: Deploy + +Click **Deploy** + +--- + +### Method 2: Git Repository + +#### Step 1: Source + +* Select GitHub repository +* Branch → `main` + +--- + +#### Step 2: Build + +* Internal Port → `8080` +* External Port → `80` +* Enable **Auto-Dockerize with Runtime** + +--- + +#### Step 3: Security + +* SAST +* SCA +* Container Scan +* IaC Scan + +--- + +#### Step 4: Resources & Deploy + +* Configure resources +* Click **Deploy** + +--- + +## Install nifectl CLI (Windows) + +### 1. Download + + https://github.com/nifetency/nifectl/releases + +Download: + +``` +nifectl-windows-amd64.zip +``` + +--- + +### 2. Extract + +* Right-click → Extract All +* Open folder + +--- + +### 3. Open Terminal + +* Type `cmd` in address bar + +OR + +* Right-click → Open in Terminal + +--- + +### 4. Verify + +```bash +nifectl --help +``` + +--- + +## Deployment using nifectl (CLI) + +### Prerequisites + +* `nifectl` installed +* Access to NIFE organization + +--- + +### Step 1: Login + +```bash +nifectl auth login +``` + +--- + +### Step 2: Initialize Project + +```bash +nifectl init +``` + +Follow prompts: + +* App Name → auto/manual +* Organization → select +* Source → Repository +* Provider → GitHub +* Branch → `main` + +--- + +### Step 3: Configure Deployment + +* Deployment Type → `Deployment` +* Resource Type → `CPU` +* Replicas → `1` + +**Ports** + +* Internal → `8080` +* External → `80` + +--- + +### Step 4: Deploy Application + +```bash +nifectl deploy +``` + +--- + +### Step 5: Select Region + +* Example: + + * `IND - India, Mumbai` + * `my-cluster` + +--- + +### Step 6: Monitor Deployment + +* Validating configuration +* Building application +* Creating release +* Deploying + +--- + +### Step 7: Access Application + +* A public URL will be generated +* Open it in your browser + +--- + +### Notes + +* Ensure correct port (`8080`) +* Repository must be accessible +* `nife.toml` stores configuration From eadc528ceba51504040e75991d37c2ef8354123c Mon Sep 17 00:00:00 2001 From: Devraj patil Date: Sat, 11 Apr 2026 00:59:15 +0530 Subject: [PATCH 4/8] updated README --- README.md | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index a37ccd3..f092038 100644 --- a/README.md +++ b/README.md @@ -465,36 +465,21 @@ Click **Deploy** ## Install nifectl CLI (Windows) -### 1. Download +#### Step 1: Download nifectl - https://github.com/nifetency/nifectl/releases - -Download: - -``` -nifectl-windows-amd64.zip -``` - ---- - -### 2. Extract - -* Right-click → Extract All -* Open folder +https://docs.nife.io/Quick-Start/Nifectl --- -### 3. Open Terminal - -* Type `cmd` in address bar +#### Step 2: Open Terminal -OR - -* Right-click → Open in Terminal +* Type `cmd` in the address bar + or +* Right-click and select **Open in Terminal** --- -### 4. Verify +#### Step 3: Verify Installation ```bash nifectl --help @@ -502,14 +487,7 @@ nifectl --help --- -## Deployment using nifectl (CLI) - -### Prerequisites - -* `nifectl` installed -* Access to NIFE organization - ---- +### Deployment Steps ### Step 1: Login From 9fafb855457c7b60be073062912164b21c76f2a1 Mon Sep 17 00:00:00 2001 From: nida Date: Sun, 12 Apr 2026 03:32:33 +0530 Subject: [PATCH 5/8] Revise README for Docker Spring Boot example Updated README to enhance clarity and provide detailed instructions for Docker Spring Boot application deployment. --- README.md | 584 ++++++------------------------------------------------ 1 file changed, 64 insertions(+), 520 deletions(-) diff --git a/README.md b/README.md index f092038..7948387 100644 --- a/README.md +++ b/README.md @@ -1,566 +1,110 @@ -Docker Container With Spring Boot Web Service Example -===================================================== -The aim is to demonstrate a running docker container with a spring boot standalone -web service thus, I've written the web service with Spring Boot as simple. For intensive -a complete web service example with Spring Boot, you can check out my other repository -which is [spring-boot-restful-web-service-example -](https://github.com/bzdgn/spring-boot-restful-web-service-example). - -TOC ---- -- [0 Spring Boot Web Service](#0-spring-boot-web-service)
-- [1 Dockerfile](#1-dockerfile) -- [2 Building The Image](#2-building-the-image) -- [3 Running And Testing The Docker Container](#3-running-and-testing-the-docker-container) -- [4 Getting Inside The Docker Container](#4-getting-inside-the-docker-container) -- [5 Stopping The Docker Container](#5-stopping-the-docker-container) -- [6 Cheat Sheet](#6-cheat-sheet) - -0 Spring Boot Web Service -------------------------- -The web service we are using in this example is kept as simple as possible for the simplicity -of demonstrating how to run a docker container. It has a simple controller class which is quite -straight-forward as it is obvious: [HelloController](https://github.com/bzdgn/docker-spring-boot-java-web-service-example/blob/master/src/main/java/com/levo/dockerexample/controller/HelloController.java) - -The key thing using a standalone Spring Boot application is to create a **Fat Jar**, also known as -**Uber Jar**. In order to create the **Uber Jar**, there are two things to be done; - -1. Add an **start-class** to point to the class acting as the Entry Point as the example below. -The reason we are doing so is, we need to reference the **.jar** file in the [Dockerfile](https://github.com/bzdgn/docker-spring-boot-java-web-service-example/blob/master/Dockerfile); +# Docker Spring Boot Java Web Service Example -``` - - com.levo.dockerexample.DockerApp - -``` - -In our example, you will see the properties as below in the [pom.xml](https://github.com/bzdgn/docker-spring-boot-java-web-service-example/blob/master/pom.xml) file. - -``` - - UTF-8 - UTF-8 - 1.8 - com.levo.dockerexample.DockerApp - -``` - -2. The second thing is, we need to know the name of our **Fat Jar** (a.k.a. **Uber Jar**). In order -to do that, we use define the **final name** under **build** section of our [pom.xml](https://github.com/bzdgn/docker-spring-boot-java-web-service-example/blob/master/pom.xml) file as below; - -``` - - docker-java-app-example - ... - ... - -``` - -In our example, the build section is as below; - -``` - - docker-java-app-example - - - org.springframework.boot - spring-boot-maven-plugin - - - -``` - -As we create our **Fat Jar** (a.k.a. **Uber Jar**) and we define the final name of our jar, -we are all set and we can write the [Dockerfile](https://github.com/bzdgn/docker-spring-boot-java-web-service-example/blob/master/Dockerfile). - -[Go back to TOC](#toc) - - -1 Dockerfile ------------- -With the **Dockerfile** we can define, configure and initialize our image and container. In **Dockerfile** we can define; - -1. Which image we are going to use. We need a docker image that has the OpenJDK and thus we are going to use Alpine; - -``` - FROM openjdk:8-jre-alpine -``` - -2. Which shell we are going to have. I prefer **Bash** which I find easy to use; - -``` - RUN apk update && apk add bash -``` - -3. The working directory our app is going to run. The name of the working directory will be **app**; - -``` - WORKDIR /app -``` - -4. The files we need to copy into our image. We will need only the **Uber Jar** file so let's copy it into the working dir; - -``` - COPY /target/docker-java-app-example.jar /app -``` - -5. The port number(s) that we need to expose to reach out from the container. Spring Boot default port is 8080; - -``` - EXPOSE 8080 -``` - -6. The commands that we need to run as the container goes live. And we need to add simply "java -jar .jar" format; - -``` - CMD ["java", "-jar", "docker-java-app-example.jar"] -``` - -Notify that the CMD(command) parameters are separated with comma. - -Then our **Dockerfile** will be as below; - -``` - # Use an official OpenJDK runtime as a parent image - FROM openjdk:8-jre-alpine - - # set shell to bash - # source: https://stackoverflow.com/a/40944512/3128926 - RUN apk update && apk add bash - - # Set the working directory to /app - WORKDIR /app - - # Copy the fat jar into the container at /app - COPY /target/docker-java-app-example.jar /app - - # Make port 8080 available to the world outside this container - EXPOSE 8080 - - # Run jar file when the container launches - CMD ["java", "-jar", "docker-java-app-example.jar"] -``` - -Now our [Dockerfile](https://github.com/bzdgn/docker-spring-boot-java-web-service-example/blob/master/Dockerfile) is all set, we can directly build the image. - -[Go back to TOC](#toc) - - -2 Building The Image --------------------- -Before building the image, we need to create the **Uber Jar** (aka **Fat Jar**) file, to do so, just clean install with maven as below; - -``` - mvn clean install -``` - -Now our **Uber Jar** file is created under the target folder with the format: "target/.jar" (or .war based on package in .pom file) - -To build the image, we will use **docker build** command and tag it. The last parameter will be the directory, by using dot ("."), -we point to the current directory. So you must run this command on the top level directory of this repository. - -``` - docker build --tag=docker-java-hello-world-app . -``` - -As you run the command which is written above, a successful example output will be as below; - -``` - C:\00_ANA\JavaEE\WS\docker-java-app-example>docker build --tag=docker-java-hello-world-app . - Sending build context to Docker daemon 16.85MB - Step 1/6 : FROM openjdk:8-jre-alpine - ---> 7e72a7dcf7dc - Step 2/6 : RUN apk update && apk add bash - ---> Running in 66ebd9812836 - fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz - fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz - v3.8.2-21-g54952ee375 [http://dl-cdn.alpinelinux.org/alpine/v3.8/main] - v3.8.2-21-g54952ee375 [http://dl-cdn.alpinelinux.org/alpine/v3.8/community] - OK: 9546 distinct packages available - (1/5) Installing ncurses-terminfo-base (6.1_p20180818-r1) - (2/5) Installing ncurses-terminfo (6.1_p20180818-r1) - (3/5) Installing ncurses-libs (6.1_p20180818-r1) - (4/5) Installing readline (7.0.003-r0) - (5/5) Installing bash (4.4.19-r1) - Executing bash-4.4.19-r1.post-install - Executing busybox-1.28.4-r2.trigger - OK: 91 MiB in 57 packages - Removing intermediate container 66ebd9812836 - ---> fa54653163af - Step 3/6 : WORKDIR /app - ---> Running in c94cbad8627a - Removing intermediate container c94cbad8627a - ---> 5a58ac387fe7 - Step 4/6 : COPY /target/docker-java-app-example.jar /app - ---> aa5930ee4a75 - Step 5/6 : EXPOSE 8080 - ---> Running in 851b519d4514 - Removing intermediate container 851b519d4514 - ---> 210ed5d1dc3f - Step 6/6 : CMD ["java", "-jar", "docker-java-app-example.jar"] - ---> Running in 55b84275e095 - Removing intermediate container 55b84275e095 - ---> a0c355a25236 - Successfully built a0c355a25236 - Successfully tagged docker-java-hello-world-app:latest - SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories. -``` - -After the image is built, you can check it with the ```docker image ls``` command. An example is as below; - -``` - C:\00_ANA\JavaEE\WS\docker-java-app-example>docker image ls - REPOSITORY TAG IMAGE ID CREATED SIZE - docker-java-hello-world-app latest a0c355a25236 About a minute ago 105MB - openjdk 8-jre-alpine 7e72a7dcf7dc 5 days ago 83.1MB -``` - - -[Go back to TOC](#toc) - - -3 Running And Testing The Docker Container ------------------------------------------- -Now we have our docker image ready however, we need to run a container based on our image. We can simply run our docker container -as below; - -``` - docker run -p 80:8080 docker-java-hello-world-app -``` - -The format is simple; - -``` - docker run -p : -``` - -The parameter **p** stands for the **port**. **External port** is the port that will be available outside of the docker container. -The **internal port** is the port that will be available inside the docker container, which is **8080** because the default port of -Spring Boot is set to **8080**. So outside of the Docker Container, we will use the port number **80**, and it is mapped to **8080** -and will reach to the Spring Boot application. - -As you run the command, you can open up your browser, you can go to this url [http://localhost:80/docker-java-app/test](http://localhost/docker-java-app/test) - -Then you will see the container is returning the string message with date as below; - -

- docker-web-test -

- -[Go back to TOC](#toc) - - -4 Getting Inside The Docker Container -------------------------------------- -While our container is running, we can get inside the running container for different purposes like checking out the logging, configuration -and other stuff. Before getting inside the container, we need to know the **container id** of our container. To do so, let's first list -the running containers with the following command; - -``` - docker container ls -``` - -A successful output example is as below; - -``` -C:\00_ANA\JavaEE\WS\docker-java-app-example>docker container ls -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -159c3ee8ef39 docker-java-hello-world-app "java -jar docker-ja…" 7 minutes ago Up 7 minutes 0.0.0.0:80->8080/tcp adoring_jackson -``` - -You can see the container id on the left-most part of the output. For this example, the container id is "159c3ee8ef39". Each container will -have a different hash, so when you run it, it will be different. We are going to use this container id to get into the docker container as below; - -``` - docker exec -it /bin/bash -``` - -The "/bin/bash" at the end denotes that we are going to use **bash** shell, which our image has. - -A successful output is as below; - -``` - C:\00_ANA\JavaEE\WS\docker-java-app-example>docker exec -it 159c3ee8ef39 /bin/bash - bash-4.4# pwd - /app - bash-4.4# ls - docker-java-app-example.jar - bash-4.4# ps -ef - PID USER TIME COMMAND - 1 root 0:08 java -jar docker-java-app-example.jar - 45 root 0:00 /bin/bash - 53 root 0:00 ps -ef - bash-4.4# exit - exit - - C:\00_ANA\JavaEE\WS\docker-java-app-example> -``` - -As you can see, the commands "pwd", "ls" and "ps -ef" successfully ran. We can see that our jar file stand in the "app" folder -as we have configured in our Dockerfile. We can easily exit with the "exit" command. - -[Go back to TOC](#toc) - - -5 Stopping The Docker Container -------------------------------- -To stop the docker container, we are going to use this command; - -``` - docker stop -``` - -It is as simple as that. Remember that when we ran the docker container, we have the Spring Boot output. I'm using windows while -writing this repository and if you hit ctrl+c, even if you are out of the scope of the logging output of Spring Boot, the container -is still alive. To stop it, you have to use the command above. A successful example is as below; - -``` -C:\00_ANA\JavaEE\WS\docker-java-app-example>docker container ls -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -159c3ee8ef39 docker-java-hello-world-app "java -jar docker-ja…" 16 minutes ago Up 16 minutes 0.0.0.0:80->8080/tcp adoring_jackson - -C:\00_ANA\JavaEE\WS\docker-java-app-example>docker container stop 159c3ee8ef39 -159c3ee8ef39 +This repository contains a simple **Spring Boot** web service packaged with **Docker** and maintained as a deployment sample for **[Nife.io](https://nife.io)**. -C:\00_ANA\JavaEE\WS\docker-java-app-example>docker container ls -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +It is designed as a lightweight example for developers who want to understand how to build a Java web service, package it into a Docker image, run it locally, and deploy it on **[Nife.io](https://nife.io)**. -C:\00_ANA\JavaEE\WS\docker-java-app-example> -``` - -[Go back to TOC](#toc) +## Overview +This project demonstrates a minimal Spring Boot application that can be built with Maven and containerized with Docker. It is intentionally small and easy to follow, which makes it useful as a reference project for local development, container workflows, and cloud deployment testing. -6 Cheat Sheet -------------- +## Prerequisites +Before getting started, make sure the following tools are installed on your machine. -1. Maven install to create the fat jar +| Requirement | Purpose | +| --- | --- | +| Java | Required to build and run the Spring Boot application | +| Maven | Used to package the application | +| Docker | Used to build and run the container image | +| Git | Used to clone the repository | -``` - mvn clean install -``` +## Getting Started -2. Docker build +Clone the repository and move into the project directory. +```bash +git clone https://github.com/nifetency/docker-spring-boot-java-web-service-example.git +cd docker-spring-boot-java-web-service-example ``` - docker build --tag=docker-java-hello-world-app . -``` - -3. Docker run - -``` - docker run -p 80:8080 docker-java-hello-world-app -``` - -4. Test the app - -``` - http://localhost/docker-java-app/test -``` - -5. Get the container id - -``` - docker container ls -``` - -6. Get into the app - -``` - docker exec -it /bin/bash -``` - -7. To stop the container - -``` - docker container stop -``` - - -[Go back to TOC](#toc) - -## Deployment on NIFE -Deploy your Spring Boot application using the NIFE UI: - -**Source → Build → Resources → Review → Deploy** - ---- - -### Method 1: Docker Image (Recommended) - -#### Step 1: Build & Push Image +Build the application with Maven. ```bash -docker build -t springboot-docker-app . -docker tag springboot-docker-app /springboot-docker-app:latest -docker push /springboot-docker-app:latest +mvn clean install ``` ---- - -#### Step 2: Configure in NIFE - -* Source → Docker Image -* Image → `/springboot-docker-app:latest` - -**Ports** - -* Internal → `8080` -* External → `80` - ---- - -#### Step 3: Resources - -* Select Region (e.g., `ap-south-1`) - -**Recommended** - -* CPU → 250m–500m -* Memory → 512MB–1GB -* Replicas → 1–2 - ---- - -#### Step 4: Deploy - -Click **Deploy** - ---- - -### Method 2: Git Repository - -#### Step 1: Source - -* Select GitHub repository -* Branch → `main` - ---- - -#### Step 2: Build - -* Internal Port → `8080` -* External Port → `80` -* Enable **Auto-Dockerize with Runtime** - ---- +This command generates the packaged application artifact used in the Docker image build process. -#### Step 3: Security +## Run Locally with Docker -* SAST -* SCA -* Container Scan -* IaC Scan - ---- - -#### Step 4: Resources & Deploy - -* Configure resources -* Click **Deploy** - ---- - -## Install nifectl CLI (Windows) - -#### Step 1: Download nifectl - -https://docs.nife.io/Quick-Start/Nifectl - ---- - -#### Step 2: Open Terminal - -* Type `cmd` in the address bar - or -* Right-click and select **Open in Terminal** - ---- - -#### Step 3: Verify Installation +Build the Docker image from the repository root. ```bash -nifectl --help +docker build -t docker-java-hello-world-app . ``` ---- - -### Deployment Steps - -### Step 1: Login +Run the container and map port `8080` from the container to your local machine. ```bash -nifectl auth login +docker run -p 8080:8080 docker-java-hello-world-app ``` ---- - -### Step 2: Initialize Project +After the container starts, you can test the service locally. ```bash -nifectl init +curl http://localhost:8080 ``` -Follow prompts: - -* App Name → auto/manual -* Organization → select -* Source → Repository -* Provider → GitHub -* Branch → `main` - ---- - -### Step 3: Configure Deployment +If the application exposes a specific endpoint in your version of the project, you can also test that route directly. -* Deployment Type → `Deployment` -* Resource Type → `CPU` -* Replicas → `1` +## Docker Setup -**Ports** +The included `Dockerfile` packages the built Spring Boot application into a runnable Java container. -* Internal → `8080` -* External → `80` - ---- - -### Step 4: Deploy Application - -```bash -nifectl deploy -``` +| Docker step | Purpose | +| --- | --- | +| Base image | Provides the Java runtime environment | +| Working directory | Sets the application path inside the container | +| Copy JAR | Adds the packaged application into the image | +| Expose port | Makes the service available on port `8080` | +| Start command | Runs the Spring Boot application with `java -jar` | ---- +## Deploy on Nife.io -### Step 5: Select Region +This repository can be used as a simple deployment sample on **[Nife.io](https://nife.io)**. -* Example: +To deploy this project, create a new application on Nife.io, connect this GitHub repository, and use the repository `Dockerfile` as the build method. - * `IND - India, Mumbai` - * `my-cluster` +| Setting | Suggested value | +| --- | --- | +| Source | Git Repository | +| Provider | GitHub | +| Repository | `nifetency/docker-spring-boot-java-web-service-example` | +| Internal Port | `8080` | +| External Port | `80` | +| Build Method | Dockerfile | ---- +For step-by-step deployment guidance, see the **[Nife.io Quick Deploy documentation](https://docs.nife.io/overview/quick-deploy)**. -### Step 6: Monitor Deployment +## Project Structure -* Validating configuration -* Building application -* Creating release -* Deploying +| Path | Purpose | +| --- | --- | +| `src/` | Spring Boot application source code | +| `Dockerfile` | Container build instructions | +| `pom.xml` | Maven configuration and dependencies | +| `README.md` | Project documentation | +| `screenshots/` | Optional screenshots for documentation | ---- +## License -### Step 7: Access Application +This project is licensed under the **MIT License**. See the `LICENSE` file for details. -* A public URL will be generated -* Open it in your browser +Copyright (c) 2026 Nife Labs ---- +## Acknowledgements -### Notes +This project is based on the original [`docker-spring-boot-java-web-service-example`](https://github.com/bzdgn/docker-spring-boot-java-web-service-example) repository by [@bzdgn](https://github.com/bzdgn). -* Ensure correct port (`8080`) -* Repository must be accessible -* `nife.toml` stores configuration +This version is maintained by **Nifetency** and positioned as a sample deployment project for **[Nife.io](https://nife.io)**. From 632c1c0ca993156c59c7b9b74a6a8718ecf5bf0f Mon Sep 17 00:00:00 2001 From: Mahammad Akhil <87204024+Mahammadakhil@users.noreply.github.com> Date: Thu, 25 Jun 2026 13:23:02 +0530 Subject: [PATCH 6/8] Add OneClick deployment section to README Added deployment instructions for NIFE OneClick. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 7948387..20fe610 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,13 @@ To deploy this project, create a new application on Nife.io, connect this GitHub | Build Method | Dockerfile | For step-by-step deployment guidance, see the **[Nife.io Quick Deploy documentation](https://docs.nife.io/overview/quick-deploy)**. +## 🚀 Deploy on NIFE OneClick + +Launch your own instance of **docker-spring-boot-java-web-service-example** with a single click. + +### Deploy as Application + +[![Deploy App on OneClick](https://img.shields.io/badge/🚀%20Deploy%20App%20on%20OneClick-6C2CF5?style=for-the-badge)](https://launch.nife.io/deploy-app/start?repository-url=https://github.com/nifetency/docker-spring-boot-java-web-service-example) ## Project Structure From e5ed04a71b5b436fed3fc347bc83ad70073ed774 Mon Sep 17 00:00:00 2001 From: Mahammad Akhil <87204024+Mahammadakhil@users.noreply.github.com> Date: Thu, 25 Jun 2026 17:22:09 +0530 Subject: [PATCH 7/8] Update README with Nife.io deployment instructions Added deployment instructions for Nife.io and removed old deployment section. --- README.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 20fe610..fb42949 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ +```html +
+ +

Deploy this project Instantly

+ + + Deploy on NIFE + + +
+``` + # Docker Spring Boot Java Web Service Example This repository contains a simple **Spring Boot** web service packaged with **Docker** and maintained as a deployment sample for **[Nife.io](https://nife.io)**. @@ -86,13 +102,6 @@ To deploy this project, create a new application on Nife.io, connect this GitHub | Build Method | Dockerfile | For step-by-step deployment guidance, see the **[Nife.io Quick Deploy documentation](https://docs.nife.io/overview/quick-deploy)**. -## 🚀 Deploy on NIFE OneClick - -Launch your own instance of **docker-spring-boot-java-web-service-example** with a single click. - -### Deploy as Application - -[![Deploy App on OneClick](https://img.shields.io/badge/🚀%20Deploy%20App%20on%20OneClick-6C2CF5?style=for-the-badge)](https://launch.nife.io/deploy-app/start?repository-url=https://github.com/nifetency/docker-spring-boot-java-web-service-example) ## Project Structure From 81484b0749498f958e38c9ed1a40685d5f9e9cca Mon Sep 17 00:00:00 2001 From: Mahammad Akhil <87204024+Mahammadakhil@users.noreply.github.com> Date: Thu, 25 Jun 2026 17:22:28 +0530 Subject: [PATCH 8/8] Update README formatting and remove HTML block Removed HTML code block from README and updated formatting. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index fb42949..d7ce052 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -```html

Deploy this project Instantly

@@ -12,7 +11,6 @@
-``` # Docker Spring Boot Java Web Service Example