Tools: Deploying Finovara on Docker and fixing a critical bug.

Tools: Deploying Finovara on Docker and fixing a critical bug.

Why I even bothered with Docker

Initial setup

The moment things got weird

What I thought vs what it actually was

Fixing it

M4rc1nek / finovara-backend

Backend service for a personal finance management application

Finovara

🎯 Purpose of the Application

🚀 Key Features I recently decided to move my Spring Boot app Finovara to Docker. At first it was just supposed to be a small improvement to the setup. In reality, it turned into a debugging session that took way longer than I expected. There were a few reasons behind this: I started with a simple PostgreSQL container and connected my app to it. Here’s a simplified version of what I used: Everything started without issues.

Database was running, app connected, no errors. So I thought I was done. I made some changes in the app, rebuilt everything, ran it again and nothing changed. At this point I was pretty sure I messed something up. My first guess was Docker caching.Seemed like the obvious explanation. But after digging a bit more, it turned out to be something else entirely. The app was connecting to a completely different database than I expected. Everything looked correct: So from the outside it looked like everything was fine, but I was basically working on one database and checking another. The fix wasn’t one single thing, more like a combination of small adjustments: After that, everything finally made sense again and changes started showing up immediately. Thanks for reading and visit my github! Finovara is a financial management platform designed to help users effectively trackanalyze, and optimize their income, expenses, and savingsThe application provides a secure, bank-like experience focused on transparency,financial awareness, and long-term money planning. Finovara aims to support users in making better financial decisions by offeringclear insights into their financial activity and helping them maintain control

over their budgets and savings. The platform focuses on: Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Code Block

Copy

services: finovara-db: image: postgres:15 container_name: finovara-db restart: always environment: POSTGRES_DB: finovara POSTGRES_USER: postgres POSTGRES_PASSWORD: ${DB_PASSWORD} ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s retries: 10 services: finovara-db: image: postgres:15 container_name: finovara-db restart: always environment: POSTGRES_DB: finovara POSTGRES_USER: postgres POSTGRES_PASSWORD: ${DB_PASSWORD} ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s retries: 10 services: finovara-db: image: postgres:15 container_name: finovara-db restart: always environment: POSTGRES_DB: finovara POSTGRES_USER: postgres POSTGRES_PASSWORD: ${DB_PASSWORD} ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s retries: 10 FROM eclipse-temurin:21-jdk WORKDIR /app COPY target/*.jar app.jar ENTRYPOINT ["java", "-jar", "app.jar"] FROM eclipse-temurin:21-jdk WORKDIR /app COPY target/*.jar app.jar ENTRYPOINT ["java", "-jar", "app.jar"] FROM eclipse-temurin:21-jdk WORKDIR /app COPY target/*.jar app.jar ENTRYPOINT ["java", "-jar", "app.jar"] - I wanted more control over the environment - I needed a separate database (finovara-test) for automated tests - I was tired of manually setting everything up locally - and I wanted something closer to a real production setup - same responses - same behavior - same DB name - same config - I changed the password in my .env file - I changed the port, because something else was already using 5432 - I cleaned up and adjusted the docker-compose config - and most importantly, I actually verified which database the app connects to - organizing income and expenses in a structured way - visualizing financial data through charts and statistics - supporting saving goals and spending limits - providing a virtual wallet concept for daily financial management - Secure user authentication and authorization - Income and expense tracking - Categorization of financial operations - Interactive charts and financial statistics - Reports summarizing spending and income trends - Virtual wallet management - Savings goals (e.g. piggy banks) - Spending limits and budget control - Scalable architecture prepared for future financial…