Install Docker
then deploy the project as the following.
install requirements.
sudo apt install composer && sudo apt install php-xml && composer update
add sail to the project.
composer require laravel/sail --dev
install sail to generate
docker-compsoe.yml
file, then edit it based on your needs.
php artisan sail:install
(re)build and run containers in
docker-compose.yml
file.
./vendor/bin/sail build --no-cache && ./vendor/bin/sail up -d
update the access inside the sail container, notice that the sail container name is
<LARAVEL-DIR-NAME>-laravel.test-1
.
sudo docker exec -it <LARAVEL-DIR-NAME>-laravel.test-1 bash
then inside the container run
chmod -R 777 . && chmod -R 777 storage/
generate key and migrate database.
./vendor/bin/sail artisan key:generate && ./vendor/bin/sail artisan migrate && ./vendor/bin/sail artisan schedule:run