Saturday, January 5, 2019

Kategori: ,

Membuat Blog dengan Laravel 5.7, VueJS, Docker, Redis, Telescope dan Pusher

docker laravel

Membuat Blog dengan Laravel 5.7, VueJS, Docker, Redis, Telescope dan Pusher


Pada kesempatan kali ini saya akan share cara membuat blog dengan Laravel5.7 dengan docker. Bagi yang belum mengerti apa itu docker silahkan belajar terlebih dahulu.

1. Instalasi


Development environment requirements :

- Docker >= 17.06 CE
- Docker Compose

Setting up your development environment on your local machine :

$ git clone https://github.com/guillaumebriday/laravel-blog.git
$ cd laravel-blog
$ cp .env.example .env
$ docker-compose run --rm --no-deps blog-server composer install
$ docker-compose run --rm --no-deps blog-server php artisan key:generate
$ docker-compose run --rm --no-deps blog-server php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
$ docker-compose run --rm --no-deps blog-server php artisan storage:link
$ docker run --rm -it -v $(pwd):/app -w /app node yarn
$ docker-compose up -d

Silahkan akses aplikadi via http://localhost:8000.

Before starting
You need to run the migrations with the seeds :

$ docker-compose run --rm blog-server php artisan migrate --seed

This will create a new user that you can use to sign in :

email: darthvader@deathstar.ds
password: 4nak1n

And then, compile the assets :

$ docker run --rm -it -v $(pwd):/app -w /app node yarn dev

Starting job for newsletter :

$ docker-compose run blog-server php artisan tinker
> PrepareNewsletterSubscriptionEmail::dispatch();

Useful commands

Seeding the database :
$ docker-compose run --rm blog-server php artisan db:seed

Running tests :
$ docker-compose run --rm blog-server ./vendor/bin/phpunit --cache-result --order-by=defects --stop-on-defect

Running php-cs-fixer :
$ docker-compose run --rm --no-deps blog-server ./vendor/bin/php-cs-fixer fix --config=.php_cs --verbose --dry-run --diff

Generating backup :
$ docker-compose run --rm blog-server php artisan backup:run

Generating fake data :
$ docker-compose run --rm blog-server php artisan db:seed --class=DevDatabaseSeeder

Discover package
$ docker-compose run --rm --no-deps blog-server php artisan package:discover

In development environnement, rebuild the database :
$ docker-compose run --rm blog-server php artisan migrate:fresh --seed


Source : https://github.com/guillaumebriday/laravel-blog


Membuat Blog dengan Laravel 5.7, VueJS, Docker, Redis, Telescope dan Pusher, tutorial, blog, laravel, laravel5, laravel5.7 torial, membuat blog, tutorial CRUD laravel, demo, live demo, laravel, laravel5, laravel5.7, php, mysql
membuat web blog dengan laravel laravel project laravel 5.7 download how to create new project in laravel how to install laravel laravel 5.5 documentation laravel create laravel docs

.

IDwebgit

Author & Editor

Suka sekali menulis dan mempelajari source code open source lisensi GNU di Github dll. Bisa pemrogramman web karena sering belajar dari contoh program yang ada di Github dll.

0 comments:

Post a Comment

 

News Letters

Subscribe here to get our newsletter in your inbox, it is safe and EASY!

IDwebgit Indonesia