Initial commit: demo-java-api with CI/CD
Some checks failed
Build & Deploy Java API / build (push) Has been cancelled
Some checks failed
Build & Deploy Java API / build (push) Has been cancelled
This commit is contained in:
44
README.md
Normal file
44
README.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Demo Java API
|
||||
|
||||
A simple Spring Boot API for CI/CD demonstration.
|
||||
|
||||
## API Endpoints
|
||||
|
||||
| Endpoint | Method | Description |
|
||||
|----------|--------|-------------|
|
||||
| `/` | GET | Returns API info with timestamp |
|
||||
| `/healthz` | GET | Health check endpoint |
|
||||
|
||||
## Local Development
|
||||
|
||||
```bash
|
||||
./mvnw spring-boot:run
|
||||
```
|
||||
|
||||
## Build Docker Image
|
||||
|
||||
```bash
|
||||
docker build -t demo-java-api .
|
||||
docker run -p 8080:8080 demo-java-api
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
demo-java-api/
|
||||
├── pom.xml # Maven config
|
||||
├── Dockerfile # Multi-stage Docker build
|
||||
├── src/
|
||||
│ └── main/
|
||||
│ ├── java/com/example/demo/
|
||||
│ │ └── DemoJavaApiApplication.java
|
||||
│ └── resources/
|
||||
│ └── application.properties
|
||||
├── deploy/helm/
|
||||
│ ├── Chart.yaml
|
||||
│ ├── values.yaml
|
||||
│ └── templates/
|
||||
│ └── deployment.yaml
|
||||
└── .gitea/workflows/
|
||||
└── build.yml # Gitea CI workflow
|
||||
```
|
||||
Reference in New Issue
Block a user