Before getting started, make sure you have the following prerequisites:
-
Ensure that the following ports are available:
- 8080
- 80
- 81
- 9200
- 8082
- 8000
- 5000
-
Download and update (pull) the following repositories:
To set up the project using Docker Compose, follow these steps:
-
Make sure you have Docker installed on your system.
-
Open a terminal and navigate to the project directory.
-
Run the following command to start the containers:
docker-compose up -d -
To verify the correct functioning, access
localhost/graphqland execute the following queries:
-
Query 1:
query { tracksByName(idTrack: "Fantasias") { tracks { items { album { images { url } albumType name id totalTracks releaseDate } externalUrls { spotify } artists { name popularity } } } } }
-
Query 2:
query { comments { Id userId picture userName } }
To restart Docker Compose, follow these steps:
-
Open a terminal and navigate to the project directory.
-
Run the following command to stop the containers:
docker-compose down -
Run the following command to remove the images (except for Elasticsearch):
docker rmi image_idReplace
image_idwith the actual ID of each image you want to remove, except for Elasticsearch. -
After removing the images, you can start the containers again using the Docker Compose setup steps mentioned above.