ZDenizYStenhaug / swe573-Project

Project repository for SWE573 - Software Development Practice
0 stars 0 forks source link

Initial dockerization #19

Closed ZDenizYStenhaug closed 2 years ago

ZDenizYStenhaug commented 2 years ago

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.

ZDenizYStenhaug commented 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

ZDenizYStenhaug commented 2 years ago

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.

ZDenizYStenhaug commented 2 years ago

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.