Files
example-back/test.md
Refactorian 4fe93734e4 Update (#1)
2023-04-18 21:50:45 +09:00

56 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Laravel開発(Docker)
====
Laravel開発(Docker環境構築)に関する情報を以下に記載する。
## ■事前準備
* インストール
* docker for desktop 
* WindowsはWSL2推奨/home配下にgit cloneする)
## ■.env設定
* `APP_URL=http://localhost` ※localhostにする
* `DB_HOST=db` ※コンテナ名にする
## ■初期構築
* `cd docker`
* `docker-compose up -d`
* Windowsのみ`exec winpty bash`
* `docker-compose exec php bash`
* `find /var/www/storage -type d -print0 | xargs -0 chmod 707`
* `cp .env.docker .env`
* `composer install`
* `php artisan migrate:refresh --seed`
* `npm install`
* `npm run dev`
## ■帳票利用時初期設定
* `find /var/www/public/tmp -type d -print0 | xargs -0 chmod 777`
## ■起動初期構築後はこちらでOK
* `docker-compose up -d`
## ■docker閉じる
* `docker-compose down`
## ■開発時のJSコンパイル
* `npm run watch-poll`
* Laravel-MixにJS統合したため、上記で変更監視しておくと楽
## ■キュー実行
* `php artisan queue:work`
## ■その他
* php-stormのターミナルをgitbash設定推奨
* 上記設定があれば、そのままターミナル上で初期設定等が可能になる
* php-storm上のDB接続が直接可能
以上