Docker image with Spring Boot connect to external Postgres
I have a Dockerized Spring Boot 3 (Java21) application and I am connect to an existing Postgres database, running on DEV & PROD.
Access Docker database from locallhost
I am running Spring Boot 3.3. and Docker. I my app can successfully access the Postgres database using the config below.
docker compose correct syntax for environment variables
I have seen multiple example for two approaches for setting environment variables in docker-compose.yml files
Docker compose is not creating creating tables in Database
I am learing Docker and encountered an error is that I have created a basic CRUD springboot application which create,getById and getAll Users then configure the Dockerfile and then docker-compose.yml. once I run docker-compose up, its starts creating images and containers and I can see that they are running perfectly ( the status is running ) but they are not creating user tables in MySQL or in simple it is not running the Springboot application just running dockerfile and docker-compose.yml..
Docker compose is creating creating tables in Database
I am learing Docker and encountered an error is that I have created a basic CRUD springboot application which create,getById and getAll Users then configure the Dockerfile and then docker-compose.yml. once I run docker-compose up, its starts creating images and containers and I can see that they are running perfectly ( the status is running ) but they are not creating user tables in MySQL or in simple it is not running the Springboot application just running dockerfile and docker-compose.yml..