- Install git and Docker Desktop.
- Start the Docker Desktop application
- Run from your terminal/cmd
git clone https://github.com/mjoris/workshops-wmfs-laravel.git
- When Docker is up and running, run from your terminal/cmd
cd workshops-wmfs-laravel
docker-compose up
- When the containers are up and running, run from a new terminal/cmd
cd workshops-wmfs-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
php artisan key:generate
- 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-wmfs-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