Had a nice challenge today playing around with docker, mainly docker-compose. What I wanted to try out was to have the entire application running in docker containers.
The setup was the following: I hade a Java Maven backend communicating with the Postgres database and for the frontend, it was a React application.
The main issue or hardship I had was creating the correct docker-compose file because the folder structure was so that the docker-compose file would reside in the root of the application path and the other parts would be in subfolders called frontend and backend.
So far I had minimal knowledge of docker or docker-compose. The main problem was, understanding how I would need to define the context where the dockerfile is and how the correct volume paths would be.
First: creating dockerfile for react app Second: creating dockerfile for java maven project Thirdly: creating docker-compose file