A Sample Webapp using Laravel 8 as back-end, React as front end and a MYSQL databse. The project is deployed using docker, with a docker compose file to build a laravel image and a MYSQL image.
Docker with WSL 2 engine
See the Docker website for installation instructions.
Steps to build a Docker image:
-
Clone this repo
git clone https://github.com/I-Alpha/SampleLaravelReactApp.git
-
In command line, navigate to project root, build the image
cd SampleLaravelReactApp/ docker compose up
or
- run sailDockerQuickstart.bat
or
- run sailDockerQuickstart.sh
This will take a few minutes.
-
Once everything has started up, you should be able to access the webapp via http://localhost:80/ on your host machine.
open http://localhost:80/
-
Run migrate.bat or use docker exec command to perform database migrations for mysql image. Optional argument : seed (seed databse with example data) ,e.g migrate seed
-
Run GetLogs.bat to save logs and docker metrics to DockerLogs folder.
-
Use shortcut scripts to quickly open container CLI, attach log files et