add pipeline 9
Some checks failed
Build-und-Deploy / build-and-deploy (push) Failing after 1s

This commit is contained in:
Nils Burghardt
2025-07-13 15:52:09 +02:00
parent bdd97cab49
commit 067c233e1c
4 changed files with 9 additions and 48 deletions

View File

@@ -1,19 +0,0 @@
name: Build
on:
push:
branches:
- master
jobs:
build:
runs-on: local
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Print working directory
run: pwd
- name: List contents
run: ls -al

View File

@@ -16,7 +16,7 @@ jobs:
- name: 🧼 IP-Adresse von Gitea zu /etc/hosts hinzufügen
run: echo "172.26.0.2 gitea" >> /etc/hosts
- name: 🛠 Baue das Projekt mit Gradle (Docker-Container)
- name: 🛠 Baue das Projekt mit Gradle (ohne Tests)
run: |
docker run --rm \
-v "${PWD}:/app" \
@@ -24,8 +24,8 @@ jobs:
gradle:8.7-jdk21 \
./gradlew build -x test
- name: 🐳 Docker Compose Build & Deploy
run: docker compose -f ./compose.yml up -d --build
- name: 🐳 Docker Compose Deploy (ohne Build)
run: docker compose -f ./compose.yml up -d
- name: 🧹 Clean Up (optional)
if: always()

View File

@@ -1,23 +0,0 @@
name: Build und Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 🧾 Repository auschecken
uses: actions/checkout@v3
- name: 🛠 Baue das Projekt
run: |
echo "🔧 Baue Projekt..."
./gradlew build
- name: 🚀 Deployment ausführen
run: |
echo "📦 Starte Deployment..."
docker compose -f ./compose.yml up -d --build

View File

@@ -18,15 +18,18 @@ services:
- traefik
app:
build: .
image: mytimetracker-app
image: eclipse-temurin:17-jdk-alpine
container_name: mytimetracker-app
depends_on:
- db
ports:
- "8400:8080" # 8400 auf dem Host, 8080 im Container
- "8400:8080"
environment:
SPRING_PROFILES_ACTIVE: docker
volumes:
- ./build/libs/MyTimeTracker-0.0.1-SNAPSHOT.jar:/app/app.jar
working_dir: /app
command: ["java", "-jar", "app.jar"]
labels:
- "traefik.enable=true"
- "traefik.http.routers.mytimetracker.rule=Host(`timetracker.nilzbu.de`)"