-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
-
Download the project with
git clone https://github.com/cbrichau/LaravelAPI.git. -
Move into the project with
cd LaravelAPI/app. -
Install the project's dependencies with
docker run --rm -u "$(id -u):$(id -g)" -v $(pwd):/var/www/html -w /var/www/html laravelsail/php81-composer:latest composer install --ignore-platform-reqs[source]. -
Launch the containers with
./vendor/bin/sail up -d. -
Set up the database with
./vendor/bin/sail artisan migrate:refresh --seed. -
Test the app on http://localhost/api/documentation or with
./vendor/bin/sail artisan test.
-
Prerequisites:
- Install Docker Desktop.
- Install Ubuntu from the Microsoft Store.
- Make sure you're running WSL 2 and that Hyper-V is enabled.
- Enable Ubuntu in Docker Desktop under Settings > Resources > WSL INTEGRATION.
- Make sure Docker Desktop is running.
-
Using GitBash, download the project with
git clone https://github.com/cbrichau/LaravelAPI.git.
Open the Ubuntu/WSL terminal for the next commands.
-
Move into the project with
cd /mnt/c/.../LaravelAPI/app. -
Install the project's dependencies with
docker run --rm -u "$(id -u):$(id -g)" -v $(pwd):/var/www/html -w /var/www/html laravelsail/php81-composer:latest composer install --ignore-platform-reqs[source]. -
Open
/app/.envin VSCode and change the line endings from CRLF to LF. -
Launch the containers with
./vendor/bin/sail up -d. -
Set up the database with
./vendor/bin/sail artisan migrate:refresh --seed. -
Test the app on http://localhost/api/documentation or with
./vendor/bin/sail artisan test.