- Docker and Docker Compose installed
- PHP 8.2 or higher (if not using Docker)
- Composer (if not using Docker)
- Laravel 11.x
- MySQL or any other supported database
-
Clone the repository:
git clone https://github.com/HidroQu/HidroQu-API.git
-
Navigate to the project directory:
cd HidroQu-API -
Install dependencies:
composer install --prefer-dist
-
Set up environment variables:
Copy the
.env.examplefile to.envand configure your database settings.cp .env.example .env
-
Generate application key:
php artisan key:generate
-
Run migrations:
php artisan migrate
-
Start the development server:
php artisan serve
Access the API at: http://localhost:8000/api.
Access the API docs at: http://localhost:8000/request-docs.
Docker Compose is the recommended approach to set up the environment quickly, as it takes care of all the dependencies and services required for the application. This method abstracts away the need to install PHP, Composer, or a web server manually.
-
Clone the repository:
git clone https://github.com/HidroQu/HidroQu-API.git
-
Navigate to the project directory:
cd HidroQu-API -
Set up environment variables:
Copy the
.env.examplefile to.envand configure your database settings.cp .env.example .env
-
Build and start the Docker containers:
docker-compose up --build
-
Generate application key:
docker exec -it hidroqu-app php artisan key:generate -
Run migrations inside the container:
docker exec -it hidroqu-app php artisan migrate
Access the API at: http://localhost:3000/api.
Access the API docs at: http://localhost:3000/request-docs.