-
Clone the repository:
git clone https://github.com/madmad7/-Rails-API-only cd <repository_folder>
-
Build and run the Docker containers:
docker-compose build docker-compose up
-
Create the database:
docker-compose run web rake db:create
-
Run database migrations:
docker-compose run web rake db:migrate
-
Fetch and store dog breeds from the Dog API:
docker-compose run web rake fetch:dog_breeds
-
Access the breeds data at:
http://localhost:3000/api/v1/dogs/breeds
GET /api/v1/dogs/breeds: Returns a list of all dog breeds.
Notes:
- Ensure Docker is installed on your machine before running the above commands.
- The default port is set to 3000; make sure this port is available or adjust the docker-compose.yml accordingly.