Skip to content

Latest commit

 

History

History
46 lines (25 loc) · 1.42 KB

README.MD

File metadata and controls

46 lines (25 loc) · 1.42 KB

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.

Prerequisites

Docker with WSL 2 engine

See the Docker website for installation instructions.

Build

Steps to build a Docker image:

  1. Clone this repo

     git clone https://github.com/I-Alpha/SampleLaravelReactApp.git
    
  2. 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.

  3. 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/
    
  4. 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

  5. Run GetLogs.bat to save logs and docker metrics to DockerLogs folder.

  6. Use shortcut scripts to quickly open container CLI, attach log files et

If you'd rather use docker-compose commands directly you can find a list of usefull docker commands here