2 Commits

Author SHA1 Message Date
726be3f613 bu commit
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 10m16s
2025-07-11 14:16:05 +02:00
936140e76f dockerCompose backup
All checks were successful
Build and Deploy Spring Boot Server / build (push) Successful in 10m4s
2025-05-11 10:15:15 +02:00
4 changed files with 170 additions and 26 deletions

7
README.md Normal file
View File

@@ -0,0 +1,7 @@
Run it locally:
1. build the current state:
mvn clean install or mvn clean install -DskipTests
2. docker it up and run it
docker-compose -f dev-docker-compose.yml up --build

View File

@@ -1,6 +1,6 @@
<mxfile host="65bd71144e"> <mxfile host="65bd71144e">
<diagram id="TZX9Tq6sZIlTxQ58HocZ" name="Page-1"> <diagram id="TZX9Tq6sZIlTxQ58HocZ" name="Page-1">
<mxGraphModel dx="826" dy="472" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> <mxGraphModel dx="989" dy="570" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root> <root>
<mxCell id="0"/> <mxCell id="0"/>
<mxCell id="1" parent="0"/> <mxCell id="1" parent="0"/>
@@ -193,6 +193,90 @@
<mxCell id="73" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;24.12.24 ; Expense ; 24,12 €&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" parent="1" vertex="1"> <mxCell id="73" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;24.12.24 ; Expense ; 24,12 €&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;" parent="1" vertex="1">
<mxGeometry x="1399" y="226" width="120" height="20" as="geometry"/> <mxGeometry x="1399" y="226" width="120" height="20" as="geometry"/>
</mxCell> </mxCell>
<mxCell id="86" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="74" target="79">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="74" value="List" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#60a917;fontColor=#ffffff;strokeColor=#2D7600;" vertex="1" parent="1">
<mxGeometry x="1880" y="160" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="75" value="DB-Structure for Categories" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="1930" y="35" width="100" height="30" as="geometry"/>
</mxCell>
<mxCell id="78" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="76" target="77">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="76" value="List Entry" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="1920" y="220" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="79" value="Available Categories" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="2160" y="150" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="83" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="81" target="79">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="81" value="Standard Categories" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="2060" y="35" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="84" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="82" target="79">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="82" value="Custom Categories" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="2270" y="35" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="91" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="87" target="90">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="87" value="List Entry" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="1920" y="280" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="92" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="88" target="89">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="88" value="List Entry" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="1920" y="340" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="89" value="Category" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="2150" y="370" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="90" value="Category" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="2150" y="315" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="94" value="&lt;h1 style=&quot;font-size: 18px;&quot;&gt;- list id&lt;/h1&gt;&lt;div&gt;- List &amp;lt;String&amp;gt;&lt;/div&gt;" style="text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;fontSize=18;" vertex="1" parent="1">
<mxGeometry x="2410" y="50" width="130" height="70" as="geometry"/>
</mxCell>
<mxCell id="77" value="Category" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="2150" y="260" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="97" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="1730" y="510" width="200" height="320" as="geometry"/>
</mxCell>
<mxCell id="98" value="ExpenseList" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="1770" y="520" width="120" height="20" as="geometry"/>
</mxCell>
<mxCell id="100" value="+" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="1880" y="790" width="30" height="30" as="geometry"/>
</mxCell>
<mxCell id="101" value="Categorie" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="1770" y="480" width="120" height="30" as="geometry"/>
</mxCell>
<mxCell id="102" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;Amount : 24,12 €&lt;br&gt;Title: Expense&lt;br&gt;Date: 24.12.24&lt;br&gt;From: Jessi&lt;br&gt;Deviation: 0 €&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#76608a;fontColor=#ffffff;strokeColor=#432D57;align=left;spacingLeft=12;" vertex="1" parent="1">
<mxGeometry x="1745" y="550" width="170" height="170" as="geometry"/>
</mxCell>
<mxCell id="105" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;Essen&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1ba1e2;fontColor=#ffffff;strokeColor=#006EAF;align=left;spacingLeft=12;" vertex="1" parent="1">
<mxGeometry x="1760" y="680" width="40" height="10" as="geometry"/>
</mxCell>
<mxCell id="106" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;Trinken&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#a20025;fontColor=#ffffff;strokeColor=#6F0000;align=left;spacingLeft=12;" vertex="1" parent="1">
<mxGeometry x="1800" y="680" width="40" height="10" as="geometry"/>
</mxCell>
<mxCell id="107" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;Auto&lt;/span&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=#A50040;align=left;spacingLeft=12;" vertex="1" parent="1">
<mxGeometry x="1840" y="680" width="40" height="10" as="geometry"/>
</mxCell>
<mxCell id="111" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=18;" edge="1" parent="1" source="108" target="74">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="108" value="Actor" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;fontSize=18;" vertex="1" parent="1">
<mxGeometry x="1715" y="150" width="30" height="60" as="geometry"/>
</mxCell>
</root> </root>
</mxGraphModel> </mxGraphModel>
</diagram> </diagram>

52
dev-docker-compose.yml Normal file
View File

@@ -0,0 +1,52 @@
version: "3.8"
services:
xpensely-server:
build:
context: .
dockerfile: Dockerfile
image: xpensely-server:local
labels:
net.unraid.docker.icon: https://tea.zendric.de/Cedric/XpenselyServer/raw/branch/main/src/main/resources/static/xpensely_icon_white.png
container_name: xpensely-server
ports:
- 3636:8080
environment:
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
DB_PORT: 5432
DB_P_NAME: xpensely
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
SPRING_PROFILES_ACTIVE: test
depends_on:
postgresdb:
condition: service_healthy
networks:
- xpensely-network
postgresdb:
labels:
net.unraid.docker.icon: https://raw.githubusercontent.com/docker-library/docs/01c12653951b2fe592c1f93a13b4e289ada0e3a1/postgres/logo.png
image: postgres:14
container_name: postgresdb
ports:
- 5435:5432
environment:
POSTGRES_DB: xpensely
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} -d xpensely
interval: 10s
timeout: 5s
retries: 5
volumes:
db_data: null
networks:
xpensely-network: null

View File

@@ -1,48 +1,49 @@
version: "3.8" version: "3.8"
services: services:
xpensely-server: xpensely-server:
build: image: tea.zendric.de/cedric/xpensely-server:0
context: . labels:
dockerfile: Dockerfile net.unraid.docker.icon: https://tea.zendric.de/Cedric/XpenselyServer/raw/branch/main/src/main/resources/static/xpensely_icon_white.png
image: xpensely-server container_name: xpensely-server
restart: always ports:
- 3636:8080
environment: environment:
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID} GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET} GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
DB_PORT: 5432 DB_PORT: 5432
DB_P_NAME: ${POSTGRES_DB} DB_P_NAME: xpensely
DB_USERNAME: ${POSTGRES_USER} DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${POSTGRES_PASSWORD} DB_PASSWORD: ${DB_PASSWORD}
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE}
depends_on: depends_on:
postgresdb: postgresdb:
condition: service_healthy condition: service_healthy
networks: networks:
- xpensely-network - xpensely-network
postgresdb: postgresdb:
labels:
net.unraid.docker.icon: https://raw.githubusercontent.com/docker-library/docs/01c12653951b2fe592c1f93a13b4e289ada0e3a1/postgres/logo.png
image: postgres:14 image: postgres:14
restart: unless-stopped container_name: postgresdb
ports:
- 5435:5432
environment: environment:
POSTGRES_DB: ${POSTGRES_DB} POSTGRES_DB: xpensely
POSTGRES_USER: ${POSTGRES_USER} POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
networks: networks:
- xpensely-network - xpensely-network
volumes:
- db_data:/var/lib/postgresql/data
- /mnt/user/appdata/xpensely_backups:/backups
restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] test:
- CMD-SHELL
- pg_isready -U ${DB_USERNAME} -d xpensely
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
volumes: volumes:
postgres_data: db_data: null
networks: networks:
xpensely-network: xpensely-network: null
driver: bridge