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 - name: 🧼 IP-Adresse von Gitea zu /etc/hosts hinzufügen
run: echo "172.26.0.2 gitea" >> /etc/hosts 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: | run: |
docker run --rm \ docker run --rm \
-v "${PWD}:/app" \ -v "${PWD}:/app" \
@@ -24,8 +24,8 @@ jobs:
gradle:8.7-jdk21 \ gradle:8.7-jdk21 \
./gradlew build -x test ./gradlew build -x test
- name: 🐳 Docker Compose Build & Deploy - name: 🐳 Docker Compose Deploy (ohne Build)
run: docker compose -f ./compose.yml up -d --build run: docker compose -f ./compose.yml up -d
- name: 🧹 Clean Up (optional) - name: 🧹 Clean Up (optional)
if: always() 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 - traefik
app: app:
build: . image: eclipse-temurin:17-jdk-alpine
image: mytimetracker-app
container_name: mytimetracker-app container_name: mytimetracker-app
depends_on: depends_on:
- db - db
ports: ports:
- "8400:8080" # 8400 auf dem Host, 8080 im Container - "8400:8080"
environment: environment:
SPRING_PROFILES_ACTIVE: docker 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: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.mytimetracker.rule=Host(`timetracker.nilzbu.de`)" - "traefik.http.routers.mytimetracker.rule=Host(`timetracker.nilzbu.de`)"