Dockerisation.
This commit is contained in:
15
Dockerfile-backend
Normal file
15
Dockerfile-backend
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM gradle:8.12.1-jdk21 AS builder
|
||||
COPY ./gradlew /app/
|
||||
COPY ./build.gradle.kts /app/
|
||||
COPY ./settings.gradle.kts /app/
|
||||
COPY ./demo-application /app/demo-application
|
||||
COPY ./demo-domain /app/demo-domain
|
||||
COPY ./demo-exposition /app/demo-exposition
|
||||
COPY ./demo-infrastructure /app/demo-infrastructure
|
||||
COPY ./demo-launcher /app/demo-launcher
|
||||
WORKDIR /app
|
||||
RUN gradle build jar
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine AS final
|
||||
COPY --from=builder /app/demo-launcher/build/libs/demo-launcher.jar /app/demo-launcher.jar
|
||||
CMD ["java", "-jar", "/app/demo-launcher.jar"]
|
||||
11
bruno-rest/GiteaActionsWorkshop/Debug.bru
Normal file
11
bruno-rest/GiteaActionsWorkshop/Debug.bru
Normal file
@@ -0,0 +1,11 @@
|
||||
meta {
|
||||
name: Debug
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{url}}/api/debug/info
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.example.demo.exposition.debug
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/debug")
|
||||
class DebugController {
|
||||
@GetMapping("/info")
|
||||
fun debug(): String = """
|
||||
{
|
||||
"message": "Hello world!"
|
||||
}
|
||||
""".trimIndent()
|
||||
}
|
||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
backend:
|
||||
image: gitea-workshop-app:latest
|
||||
container_name: gitea-workshop-app-backend
|
||||
ports:
|
||||
- "50000:8080"
|
||||
restart: always
|
||||
networks:
|
||||
- "gitea-workshop"
|
||||
|
||||
networks:
|
||||
gitea-workshop:
|
||||
Reference in New Issue
Block a user