Go to the root of the project and run
docker-compose up -d --build
execute the command the following
- Go inside the container
sudo docker-compose exec php-apache /bin/bash
- Migrate table
php artisan migrate
- Seeding database
php artisan db:seed
run teh following command
1)login command
sudo docker-compose exec database /bin/bash
- login to the postgresql database
psql -U postgres laravel_docker
- displaying the database data
SELECT * FROM quotes;
You will see the data for the database