majidfeiz / laravel-docker

Build a simple laravel development environment with mysql , redis by docker compose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project logo

Laravel Docker

Status GitHub Issues GitHub Pull Requests License


Build a simple laravel development environment with mysql , redis by docker compose

πŸ“ Contents

🧐 About

Build a simple laravel development environment with docker-compose. Compatible with Windows, macOS and Linux with mysql , redis by docker compose

🏁 Getting Started

See Prerequisites for notes on how to deploy the project on your system.

Prerequisites

  1. Install docker in your system.
  2. Clone the project https://github.com/majidfeiz/laravel-docker.git
  3. Make development environment ready using commands below :
$ git clone https://github.com/majidfeiz/laravel-docker.git
$ cd laravel-docker
$ git clone https://github.com/laravel/laravel.git src
$ cp .env.example .env
$ docker-compose up -d
$ docker exec -it laravel-web cp .env.example .env
$ docker exec -it laravel-web php artisan key:generate

Now you can start your laravel on your custom port for example localhost:8080 or 127.0.0.1:8080

Installing

Install docker in your system using below links :

🎈 Usage

Laravel

If you need to write command on your laravel project follow below commands :

docker exec -it laravel-web php artisan ....

If you need go in container follow below command:

docker exec -it laravel-web /bin/bash

Redis

If you need go on redis cli follow below command :

docker exec -it laravel-redis redis-cli

Mysql

If you need go in mysql follow below command :

docker exec -it laravel-db mysql -u test -p

If you need phpmyadmin open localhost on port 8080 and fill in username and password

Note : your database host name is laravel-db

⛏️ Built Using

✍️ Authors

See also the list of contributors who participated in this project.

About

Build a simple laravel development environment with mysql , redis by docker compose

License:MIT License


Languages

Language:Dockerfile 89.8%Language:Shell 10.2%