Welcome to Project Name! This repository contains [brief description of the project].
Follow the steps below to set up the project on your local machine:
Clone the project repository into any directory of your choice:
git clone https://github.com/pachecocmi/taskbackend.git
Clone Laradock repository next to your project directory:
git clone https://github.com/Laradock/laradock.git
Navigate to the Laradock directory and rename .env.example to .env:
cd laradock
cp .env.example .env
Next, navigate to the nginx/sites directory within Laradock and remove the .example extension from the configuration files:
cd nginx/sites
mv laravel.conf.example laravel.conf
mv node.conf.example node.conf
mv symfony.conf.example symfony.conf
[Remove .example from default.conf.example if present]
Open default.conf and ensure the root is set to /var/www. This configuration ensures Nginx locates the Laravel index correctly.
Modify the server_name in laravel.conf to match your project's domain.
Start the Docker containers using Docker Compose:
docker-compose up -d nginx mysql phpmyadmin redis workspace
Run NPM build to compile assets (if applicable):
npm run build
Run database migrations to create the required database tables:
php artisan migrate
Update your project's .env file with the following settings:
DB_HOST=mysql
REDIS_HOST=redis
QUEUE_HOST=beanstalkd
Next, update the hosts file and add the project name
127.0.0.1 taskmanager.test
After above setup, http://taskmanager.test should show the website's welcome page.
If you encounter Laravel log permission issues, set appropriate permissions for the storage directory:
chmod -R ugo+rw storage
The following routes are available for interacting with tasks:
POST /api/task/list
This route retrieves a list of tasks. You can optionally provide a query parameter status to filter tasks by status.
POST /api/task/create
Use this route to create a new task. The request should include a JSON body with description field for the task description.
POST /api/task/update
Update an existing task by providing the id of the task to be updated along with the new description field in the request body.
POST /api/task/complete
Mark a task as completed by providing the id of the task to be marked as completed in the request body.
POST /api/task/delete
Delete a task by providing the id of the task to be deleted in the request body.
For more detailed information on Laradock, refer to the Laradock documentation. For more information on Laravel and it's installation procedures, refer to the Laravel Documentation.