Closed ZDenizYStenhaug closed 2 years ago
For the new architecture without Angular frontend, there's no need for a third container. The Postgresql databse is already running on docker. The Spring project must be dockerized and comminucate with the database
Wrote the dockerfile, and the docker compose. The image is created without a problem, but it does not connect to the database. I couldn't fix it with network / link attribute in docker-compose fille.
Fixed the problem replacing "localhost" with "database" (the name of the service in docker compose) in the routing. Also commented out the application.properties file.
All components of the project should be dockerized. To do this, first research dockerfiles to build images. Then add the images of the frontent and the backend project to the existing docker-compose.yml file. The three containers should be able to communicate. The backend should depend on the db and the frontent should depend on the backend.