Docker compose laravel 2 tier architecture.
- docker-compose up -d (To run the docker containers in detached mode)
- docker-compose exec app composer install (Install packages)
- docker-compose exec app php artisan config:cache (To clear the php cache)
- docker-compose exec db bash (To create the user and give access to database)
- mysql -uroot -plaravelroot
- GRANT ALL ON laravel.* TO 'laraveluser'@'%' IDENTIFIED BY 'laravelroot';
- FLUSH PRIVILEGES;
- exit; (To exit from the mysql console)
- exit (To exit from the bash console)
- docker-compose exec app php artisan migrate (To migrate the table structure)
- Open the browser and type "http://localhost/" in the url.
- Type the task to Add.
- List task.