- Docker: Ensure that Docker is installed on your machine. You can download Docker from the official website: Docker
-
Clone the Repository:
Open a terminal and run the following commands:
git clone https://github.com/Andreluizfc/duck-movies-api.git cd duck-movies-api
-
Build the Docker Image:
Run the following command to build the Docker image:
docker-compose build
-
Run the FastAPI Application:
Start the FastAPI application with the following command:
docker-compose up run_api
Wait until you see logs indicating that the application is running.
-
Run Tests:
Ensure that the FastAPI application is fully started before running the tests.
Execute the tests with the following command in another terminal:
docker-compose up run_tests
Once the application is running, access the API at http://0.0.0.0:8000 in your browser or use tools like curl or Postman to interact with the API.
If you encounter issues, make sure Docker is properly installed, and there are no port conflicts on your machine.
If the route http://0.0.0.0:8000 in unnacessbile, try to run the app in http://127.0.0.1 changing it in the docker-compose.yaml file