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.
Why I even bothered with Docker
There were a few reasons behind this:
- 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
Initial setup
I started with a simple PostgreSQL container and connected my app to it.
Here’s a simplified version of what I used:
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
Dockerfile:
FROM eclipse-temurin:21-jdk
WORKDIR /app
COPY target/*.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]
Everything started without issues.
Database was running, app connected, no errors.
So I thought I was done.
The moment things got weird
I made some changes in the app, rebuilt everything, ran it again and nothing changed.
- same responses
- same data
- same behavior
At this point I was pretty sure I messed something up.
What I thought vs what it actually was
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:
- same DB name
- same user
- same config
So from the outside it looked like everything was fine, but I was basically working on one database and checking another.
Fixing it
The fix wasn’t one single thing, more like a combination of small adjustments:
- I changed the password in my
.envfile - 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
After that, everything finally made sense again and changes started showing up immediately.
Thanks for reading and visit my github!
M4rc1nek
/
finovara-backend
Backend service for a personal finance management application
Finovara
Finovara is a financial management platform designed to help users effectively track analyze, and optimize their income, expenses, and savings The application provides a secure, bank-like experience focused on transparency, financial awareness, and long-term money planning.
🎯 Purpose of the Application
Finovara aims to support users in making better financial decisions by offering clear insights into their financial activity and helping them maintain control over their budgets and savings.
The platform focuses on:
- 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
🚀 Key Features
- 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…
Top comments (0)