Skip to content

Laravel-Vue app skeleton wrapped in docker containers

Notifications You must be signed in to change notification settings

othmanus/laravel-vue-docker

Repository files navigation

Laravel

Framework documentation: https://laravel.com/docs

Dev

Prerequisites

  • Docker

Content

  • Laravel 6.x
  • PHP 7.4
  • MySQL 5.7
  • Nginx
  • VueJS 2
  • Tailwindcss 1.1

Install

1 - Setup the app

mv .env.example .env

Then change the DB and user's credentials.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=app
DB_USERNAME=root
DB_PASSWORD=root
ROOT_ID=2
[email protected]
ROOT_NAME=MyName
ROOT_PASSWORD=MyPassword

1 - Pull docker image

docker-compose build

Then run

docker-compose up -d

3 - SSH to the container

docker exec -it laravel-vue-docker_app_1 /bin/bash

4 - Install the app

/var/www# composer install
/var/www# php artisan key:generate
/var/www# php artisan migrate --seed
/var/www# npm install

Run

docker-compose up -d

Then SSH to the container to execute php artisan commands or npm commands.

Testing

To run tests, SSH to the container then run ./vendor/bin/phpunit tests/*

Authentication

The authentication views are based on Laravel's default scaffolding. You can use the custom Vuejs components by using them in login and register pages.

Run

To access the homepage

http://localhost:8000/

To access the admin page:

Login with the root admin credentials, then access to:

http://localhost:8000/admin

About

Laravel-Vue app skeleton wrapped in docker containers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published