22 Commits

Author SHA1 Message Date
f49530653b Merge pull request 'initial Release request' (#1) from dev into main
Some checks failed
Build and Deploy Versioned Spring Boot Server / build (push) Failing after 9m45s
Reviewed-on: #1
2025-01-12 01:46:30 -08:00
25e70ddf68 tag releases
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 9m53s
2025-01-12 10:35:50 +01:00
4fca98dc72 add logos
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 9m55s
2025-01-12 10:11:57 +01:00
c453411444 fixes
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 10m0s
2025-01-11 21:37:11 +01:00
85e4a2b125 remove dotenv
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 10m11s
2025-01-11 21:20:58 +01:00
ece3e1d697 fix app_props
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 10m0s
2025-01-11 20:48:53 +01:00
d39b5e875c docker compose sample
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 10m1s
2025-01-11 20:24:33 +01:00
12f6733b48 fix user
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 10m7s
2025-01-11 14:16:49 +01:00
Cedric Hornberger
e12e8067ce ich dreh am login
Some checks failed
Build and Deploy Spring Boot Server / build (push) Failing after 9m57s
2025-01-11 11:58:07 +01:00
Cedric Hornberger
0b624f1562 docker login 2025-01-11 11:46:19 +01:00
76cfaecdda push docker
Some checks failed
Build and Deploy Spring Boot Server / build (push) Failing after 9m49s
2025-01-11 01:12:46 +01:00
82cdca6f0a aaaaahhhh
Some checks failed
Build and Deploy Spring Boot Server / build (push) Has been cancelled
2025-01-11 01:04:20 +01:00
4fbee3852a docker fix
Some checks failed
Build and Deploy Spring Boot Server / build (push) Has been cancelled
2025-01-11 00:58:27 +01:00
bed8a2e0f5 docker fix
Some checks failed
Build and Deploy Spring Boot Server / build (push) Has been cancelled
2025-01-11 00:50:18 +01:00
197e40dfd5 fix
Some checks failed
Build and Deploy Spring Boot Server / build (push) Has been cancelled
2025-01-11 00:41:19 +01:00
01aa12e8a2 temurin 2025-01-11 00:37:32 +01:00
6d806fbc20 fix adoptium
Some checks failed
Build and Deploy Spring Boot Server / build (push) Failing after 3s
2025-01-11 00:35:56 +01:00
77073ddba6 openjdk
Some checks failed
Build and Deploy Spring Boot Server / build (push) Failing after 4s
2025-01-11 00:34:43 +01:00
96b9989a2a fix maven
Some checks failed
Build and Deploy Spring Boot Server / build (push) Has been cancelled
2025-01-11 00:27:25 +01:00
38bb0f131c test
Some checks failed
Build and Deploy Spring Boot Server / build (push) Failing after 23s
2025-01-11 00:24:49 +01:00
2bcc2ec23f Merge branch 'dev' of ssh://tea.zendric.de:2223/Cedric/XpenselyServer into dev
Some checks failed
Build and Deploy Spring Boot Server / build (push) Failing after 34s
2025-01-11 00:13:30 +01:00
1fd1e8ae75 test workflow 2025-01-11 00:13:25 +01:00
9 changed files with 142 additions and 74 deletions

View File

@@ -0,0 +1,54 @@
name: Build and Deploy Spring Boot Server
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
# 1. Checkout the code
- name: Checkout code
uses: actions/checkout@v2
# 2. Set up Java and Maven
- name: Set up JDK (Eclipse Temurin)
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
cache: maven
# 3. Verify Maven installation
- name: Install Maven
run: |
sudo apt-get update
sudo apt-get install -y maven
mvn -version
# 4. Build the Spring Boot application
- name: Build Spring Boot Application
run: |
mvn clean package -DskipTests
# 5. Set up Docker
- name: Set up Docker
run: |
docker --version
# 6. Build the Docker image
- name: Build and Package Docker Image
run: |
docker build -t tea.zendric.de/cedric/xpensely-server:latest .
# 7. Docker login
- name: Login to Docker Registry
run: |
echo "${{ secrets.TEAPASSWORD }}" | docker login tea.zendric.de -u ${{ secrets.TEAUSER }} --password-stdin
# 8. Push Docker image
- name: Push the Docker Image to registry
run: |
docker push tea.zendric.de/cedric/xpensely-server:latest

View File

@@ -0,0 +1,62 @@
name: Build and Deploy Versioned Spring Boot Server
on:
push:
tags: # Match all tags
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
# 1. Checkout the code
- name: Checkout code
uses: actions/checkout@v2
# 2. Set up Java and Maven
- name: Set up JDK (Eclipse Temurin)
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
cache: maven
# 3. Verify Maven installation
- name: Install Maven
run: |
sudo apt-get update
sudo apt-get install -y maven
mvn -version
# 4. Build the Spring Boot application
- name: Build Spring Boot Application
run: |
mvn clean package -DskipTests
# 5. Set up Docker
- name: Set up Docker
run: |
docker --version
# 6. Extract the tag name
- name: Extract Tag Version
id: extract_version
run: |
TAG_VERSION=${GITEA_REF#refs/tags/}
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
# 7. Build the Docker image with the tag
- name: Build and Package Docker Image
run: |
docker build -t tea.zendric.de/cedric/xpensely-server:${{ env.TAG_VERSION }} .
# 8. Docker login
- name: Login to Docker Registry
run: |
echo "${{ secrets.TEAPASSWORD }}" | docker login tea.zendric.de -u ${{ secrets.TEAUSER }} --password-stdin
# 9. Push the Docker image with the tag
- name: Push the Docker Image to registry
run: |
docker push tea.zendric.de/cedric/xpensely-server:${{ env.TAG_VERSION }}

View File

@@ -1,46 +0,0 @@
name: Build and Deploy Spring Boot Server
on:
push:
branches:
- dev
jobs:
build:
runs-on: self-hosted
steps:
# 1. Checkout the code
- name: Checkout code
uses: actions/checkout@v2
# 2. Set up Java and Maven
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: "17"
- name: Verify Maven installation
run: |
mvn -version
# 3. Build the Spring Boot application
- name: Build Spring Boot Application
run: |
mvn clean package -DskipTests
# 4. Set up Docker
- name: Set up Docker
run: |
docker --version
docker-compose --version
# 5. Build the Docker image using docker-compose
- name: Build and Package Docker Image
run: |
docker-compose build
# 6. Start the application with dependencies
- name: Start the Docker Compose Application
run: |
docker-compose up -d

View File

@@ -1,30 +1,42 @@
version: "3"
version: "3.8"
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: XpenselyServer
xpensely-server:
image: tea.zendric.de/cedric/xpensely-server:latest
container_name: xpensely-server
ports:
- "8080:8080"
- 3636:8080
environment:
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
DB_PORT: 5432
DB_CONTAINER: ${DB_P_CONTAINER}
DB_PORT: 5434
DB_NAME: ${DB_P_NAME}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
depends_on:
- postgresdb
postgresdb:
condition: service_healthy
networks:
- xpensely-network
postgresdb:
image: postgres:14
container_name: postgresdb
ports:
- "5432:5432"
- 5434:5432
environment:
POSTGRES_DB: ${DB_P_NAME}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
networks:
- xpensely-network
volumes:
- db_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
db_data: null
networks:
xpensely-network: null

View File

@@ -50,11 +50,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>io.github.cdimascio</groupId>
<artifactId>dotenv-java</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>

View File

@@ -4,20 +4,11 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import io.github.cdimascio.dotenv.Dotenv;
@SpringBootApplication
@EnableScheduling
public class XpenselyServerApplication {
public static void main(String[] args) {
Dotenv dotenv = Dotenv.load(); // Loads the .env file
System.setProperty("GOOGLE_CLIENT_ID", dotenv.get("GOOGLE_CLIENT_ID"));
System.setProperty("GOOGLE_CLIENT_SECRET", dotenv.get("GOOGLE_CLIENT_SECRET"));
System.setProperty("DB_USERNAME", dotenv.get("DB_USERNAME"));
System.setProperty("DB_PASSWORD", dotenv.get("DB_PASSWORD"));
System.setProperty("DB_DEV_CONTAINER", dotenv.get("DB_DEV_CONTAINER"));
System.setProperty("DB_DEV_NAME", dotenv.get("DB_DEV_NAME"));
SpringApplication.run(XpenselyServerApplication.class, args);
}

View File

@@ -8,7 +8,7 @@ spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_
spring.security.oauth2.resourceserver.jwt.issuer-uri=https://accounts.google.com
# PostgreSQL Configuration
spring.datasource.url=jdbc:postgresql://${DB_DEV_CONTAINER}:5432/${DB_DEV_NAME}
spring.datasource.url=jdbc:postgresql://postgresdb:${DB_PORT}/${DB_P_NAME}
spring.datasource.username=${DB_USERNAME}
spring.datasource.password=${DB_PASSWORD}
spring.datasource.driver-class-name=org.postgresql.Driver

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB