Skip to content
Laravel e Docker Start Application
PHP HTML Vue
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bootstrap
config
database
laradock
public
resources
routes
storage
tests
.editorconfig
.gitattributes
.gitignore
README
artisan
composer.json
composer.lock
package.json
phpunit.xml
readme.md
server.php
webpack.mix.js

readme.md

Isjeady Youtube Video Youtube e isjeady.com

Init

  • Scarica Docker
  • Scarica laravel project
  • Scarica Laradock
  • Copia laradock nella dir del project laravel
  • Spostati nella dir laravel e copia il file .env mv .envexample .env
  • Configura .env Laradock Sezione MYSQL
  • Configura .env Laravel Sezione MYSQL

Lancia Docker docker-compose up -d //start containers

Indirizzo : 127.0.0.1 trovi il site

docker-compose stop 

docker-compose kill

Database

docker exec -it alias_mysql bash
  • -***Per accedere alla console interna mysql ***
mysql -uroot -proot
  • Incolla questo codice modificando con nome db e tupassword uguali a quello che ha scritto nei file env
CREATE USER 'admin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'tuapassword';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
CREATE USER 'admin'@'%' IDENTIFIED WITH mysql_native_password BY 'tuapassword';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;
#
CREATE DATABASE IF NOT EXISTS `isjeadydocker` COLLATE 'utf8_general_ci' ;
GRANT ALL ON `isjeadydocker`.* TO 'admin'@'%' ;
FLUSH PRIVILEGES ;
  • Crea la connessione con mysql workbanch

Esegui

-docker exec -it alias_workspace bash

-php artisan migrate 

Dovresti aver terminato. Se hai problemi di accesso al Db puoi provare a creare l'utenza direttamente da mysql workbanch.

All code released under the MIT License

You can’t perform that action at this time.