0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

DockerでLaravelの環境構築した話

Last updated at Posted at 2020-07-15

#この記事を参考にDocker環境構築

Dockerを使ってLaravel開発環境構築
https://qiita.com/A-Kira/items/1c55ef689c0f91420e81

#ハマるポイント1 phpのdockerfile記述
このままだと、Laravelのインストールがうまくいかない・・・(PHPのバージョンが7.3以上じゃないとだめみたい)
→バージョン7.2だったのを7.4へ変更

zlib1g-devで引っかかる
→libzip-devに変更

#ハマるポイント2 nginx 404
cloneして、
composer installして、
.env作って、

docker-compose exec php bash
php artisan migrate

一応、動くようになったけど・・・TOPページ以外、nginx 404になる
https://qiita.com/isaatsu0131/items/f1eafe7522f0bf0ff043

location / {
   try_files $uri $uri/ /index.php?$query_string;
 }

default.confのロケーションの記述を修正

#ハマるポイント3 storageへのシンボリックリンク
動作チェックしてみたけど・・・画像が表示されない

docker-compose exec php bash
php artisan storage:link

以上

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?