Interactive workshop slides for the course Full-stack Development, part of the Professional Bachelor ICT study program @ Odisee, Belgium.
A web-based slideshow containing many PHP/Laravel code examples, which can be interactively executed in the provided Docker multi-container environment.
(CC) Joris Maervoet
- Install git and run from your terminal/cmd
git clone https://github.com/mjoris/workshops-fsd-laravel.git
- Open the file
workshops-fsd-laravel/app/public/slides/index.html
in a browser
- Install git and Docker Desktop.
- Start the Docker Desktop application
- Run from your terminal/cmd
git clone https://github.com/mjoris/workshops-fsd-laravel.git
- When Docker is up and running, run from your terminal/cmd
cd workshops-fsd-laravel
docker-compose up
- When the containers are up and running, run from a new terminal/cmd
cd workshops-fsd-laravel
docker-compose exec php-web bash
From the Bash terminal in the php-web container, run the following commands:
composer install
cp .env.example .env
chmod -R 777 storage bootstrap/cache
php artisan key:generate
php artisan migrate
php artisan db:seed --class DemoSeeder
- Browse to http://localhost:8080
- Stop the environment in your terminal/cmd by pressing
Ctrl+C
- In order to avoid conflicts with your lab environment, run from your terminal/cmd
docker-compose down
- Run from your terminal/cmd, in your
workshops-fsd-laravel
directory
git reset --hard
git pull origin master
- Look at the output of
docker-compose up
. When a container (fails and) exits, it is shown as the last line of the container output (colored tags by container) - Alternatively, start another terminal/cmd and inspect the output of
docker-compose ps -a
. You can see which container exited, exactly when. - Probably one of the containers fails because TCP/IP port 8000, 8080 or 3307 is already in use on your system. Stop the environment, change the port in
docker-compose.yml
en rerundocker-compose up
.
Might be necessary when this repository contains raw database updates.
- Before running
docker-compose up
, delete all files in themysql-data
directory
Nevertheless, Laravel-related database updates will be provided in the form of Migrations, which can be administered by running php artisan migrate
from the php-web container