SuperFullStack / laravel-vue-graphql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

laravel-vue-graphql Web App

Ports

Ports used in the project:

Software Port
nginx 8080
phpmyadmin 8081
mysql 3306
php 9000
xdebug 9001
redis 6379

Use

To get started, make sure you have Docker installed on your system and Docker Compose, and then clone this repository.

  1. Clone this project:

    git clone https://github.com/toptalentdev/laravel-vue-graphql.git
  2. Inside the folder laravel-vue-graphql and Generate your own .env to docker compose with the next command:

    cp .env.example .env
  3. Run the project whit the next commands:

    docker-compose up

Remember

The configuration of the database must be the same on both sides .

# .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db_name
DB_USERNAME=db_user
DB_PASSWORD=db_password
DB_ROOT_PASSWORD=secret
# source/.env
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=db_name
DB_USERNAME=db_user
DB_PASSWORD=db_password

The only change is the DB_HOST in the source/.env where is called to the container of mysql:

# source/.env
DB_HOST=mysql

Special Cases

To Down the volumes we use the next command:

docker-compose down

Install Composer:

docker-compose run composer install

Run compiler (Webpack.mix.js) or Show the view compiler in node:

docker-compose run npm run dev

Run all migrations:

docker-compose run artisan migrate

Seed database:

docker-compose run artisan db:seed

About


Languages

Language:PHP 79.4%Language:Vue 18.1%Language:Shell 1.0%Language:Dockerfile 1.0%Language:Blade 0.6%