Compare commits

...

2 Commits

Author SHA1 Message Date
Florian THIERRY
4497891788 First workflow.
Some checks failed
Build and Deploy Kotlin gradle Application / build-and-deploy (push) Has been cancelled
2025-05-11 13:07:32 +02:00
Florian THIERRY
458e72d6aa Dockerisation. 2025-05-11 12:39:40 +02:00
6 changed files with 78 additions and 0 deletions

9
.gitea/gitea-runner.yml Normal file
View File

@@ -0,0 +1,9 @@
services:
runner:
image: docker.io/gitea/act_runner:latest
environment:
GITEA_INSTANCE_URL: "http://192.168.0.25:3000"
GITEA_RUNNER_REGISTRATION_TOKEN: "IfowioCs4PedXyRJMnedDVCXkRHjyDrZv1sdvaif"
GITEA_RUNNER_NAME: "runner-1"
volumes:
- /var/run/docker.sock:/var/run/docker.sock

View File

@@ -0,0 +1,15 @@
name: Build and Deploy Kotlin gradle Application
on:
push:
branches:
- working-poc
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Hello world
run: |
echo 'Hello world'
echo 'Done'

15
Dockerfile-backend Normal file
View 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"]

View File

@@ -0,0 +1,11 @@
meta {
name: Debug
type: http
seq: 3
}
get {
url: {{url}}/api/debug/info
body: none
auth: none
}

View File

@@ -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
View 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: