/cslp

CodeGym Sample Laravel Project

Primary LanguagePHP

CODEGYM's Laravel Project Sample Build Status

If you want running project manually, please read here

Overview

  1. Install prerequisites

    Before installing project make sure the following prerequisites have been met.

  2. Clone the project

    We’ll download the code from its repository on GitHub.

  3. Run the application

    By this point we’ll have all the project pieces in place.

  4. PHPMyadmin [Optional]

    Manage database with phpmyadmin


Install prerequisites

For now, this project has been mainly created for Unix (Linux/MacOS). Perhaps it could work on Windows.

All requisites should be available for your distribution. The most important are :

Check if docker-compose is already installed by entering the following command :

which docker-compose

Check Docker Compose compatibility :

The following is optional but makes life more enjoyable :

which make

On Ubuntu and Debian these are available in the meta-package build-essential. On other distributions, you may need to install the GNU C++ compiler separately.

sudo apt install build-essential

Images to use

You should be careful when installing third party web servers such as MariaDB or Nginx.

This project use the following ports :

Server Port
MySQL 33060
PHPMyAdmin 8999
Nginx 8880

Clone the project

To install Git, download it and install following the instructions :

git clone https://github.com/vuhuyhien/cslp.git

Go to the project directory :

cd cslp

Run the application

  1. Create the docker environment file :

    cp .env.docker .env
  2. Init project and seeding data :

    sudo docker-compose up laravel_init

    You should taking a coffee, composer is very slow...

  3. Running laravel :

    sudo docker-compose up -d web

    Please wait this might take a several minutes

  4. Open your favorite browser :

  5. Stop and clear services :

    sudo docker-compose down -v

PHPMyadmin

  1. Start container:

    sudp docker-compose up -d phpmyadmin
  2. Login:

    http://localhost:8999

    • host: ${MYSQL_HOST} (defined in .env)
    • user: ${MYSQL_USER} (defined in .env)
    • pass: ${MYSQL_PASSWORD} (defined in .env)