laradock

Laradock 使用中遇到的问题汇总

≯℡__Kan透↙ 提交于 2020-05-08 05:20:16
1、ErrorException] mkdir (): Permission denied 解决:权限不够,thinkphp5下,runtime 文件夹改777,文件所有者改为 laradock(进入workspace执行)。 2、thinkphp5 使用exit()函数,nginx返回500状态码 解决:runtime 文件夹改777 3、连接问题 在容器中执行时,MySQL连接的 Host 设置为 mysql,如果是外部客户端直接连接的话设置为常规地址。 redis等同理。 4、 win10构建workspace时,报错提示/tmp/sources.sh: not found git bash 中 切换到 laradock 目录 $ vi ./workspace/sources.sh $ :set ff=unix $ :wq https://github.com/laradock/laradock/pull/2388 5、NVM 慢的问题 在 env 文件中设置 WORKSPACE_NVM_NODEJS_ORG_MIRROR = https://npm.taobao.org/mirrors/node 这是设置 nvm 安装 nodejs 时从哪个镜像下载源文件的参数,设置后, nodejs 安装的飞快. https://segmentfault.com/a

Failed to connect to raw.githubusercontent.com port 443

点点圈 提交于 2020-02-27 01:49:01
问题 执行 sudo docker-compose up -d nginx mysql 指令,报错: Service 'workspace' failed to build. Failed to connect to raw.githubusercontent.com port 443: Connection refused. /bin/sh: 1: .: Can't open /home/laradock/.nvm/nvm.sh 原因 由于某些 你懂的因素 ,导致GitHub的 raw.githubusercontent.com 域名解析被污染了。 解决方法 通过修改 hosts 解决此问题。 查询真实IP 在 https://www.ipaddress.com/ 查询raw.githubusercontent.com的真实IP。 修改hosts sudo vim /etc/hosts 添加如下内容: 199.232.28.133 raw.githubusercontent.com 重新执行 重新执行 sudo docker-compose up -d nginx mysql 即可。 来源: oschina 链接: https://my.oschina.net/matrixchan/blog/3160812

Docker can't mount folder on Windows

拟墨画扇 提交于 2020-01-15 03:10:35
问题 I can't mount a folder on Docker on Windows. I'm using the repository https://github.com/LaraDock/laradock. In docker-compose.yml , line 23, there is a folders mapping: application: build: ./application volumes: - ../:/var/www/laravel In the VirtualBox folder, D:\VM is shared. When I start the container and list files there is just the laradock folder, but I have a whole Laravel installation in that folder that should be, but isn't listed. username@pc MINGW64 /d/VM/zemke2/laradock (master) $

Why don't my Laravel 5.2 events work on production when they work locally?

北城以北 提交于 2019-12-24 17:27:39
问题 Locally, my Laravel 5.2 project works well, including events that are queued using Redis. IMPORTANT UPDATE: I later discovered that this premise was incorrect (and my events don't use Redis), and so I'd accidentally posted this question in a misleading way. I hope my ridiculously long struggle and my answer below will be helpful to someone else who is an events newbie too. But I've deployed my project to a production server (where I'm using a Laradock Docker setup). There, on production,

How to use Deployer with Docker (Laradock)

倖福魔咒の 提交于 2019-12-10 10:27:11
问题 I created a fresh Digital Ocean server with Docker on it (using Laradock) and got my Laravel website working well. Now I want to automate my deployments using Deployer. I think my only problem is that I can't get Deployer to run docker exec -it $(docker-compose ps -q php-fpm) bash; , which is the command I successfully manually use to enter the appropriate Docker container (after using SSH to connect from my local machine to the Digital Ocean server). When Deployer tries to run it, I get this

npm install on laradock not working

半腔热情 提交于 2019-12-07 14:20:09
问题 I created a Laravel project using Laradock. When I run npm install I get the following output. > node-sass@4.9.0 install /var/www/npmtest/node_modules/node-sass > node scripts/install.js fs.js:119 throw err; ^ Error: EINVAL: invalid argument, open '/var/www/npmtest/node_modules/node-sass/package.json' at Object.openSync (fs.js:443:3) at Object.readFileSync (fs.js:348:35) at Object.Module._extensions..json (internal/modules/cjs/loader.js:719:20) at Module.load (internal/modules/cjs/loader.js

How to use Deployer with Docker (Laradock)

青春壹個敷衍的年華 提交于 2019-12-06 05:07:51
I created a fresh Digital Ocean server with Docker on it (using Laradock ) and got my Laravel website working well. Now I want to automate my deployments using Deployer . I think my only problem is that I can't get Deployer to run docker exec -it $(docker-compose ps -q php-fpm) bash; , which is the command I successfully manually use to enter the appropriate Docker container (after using SSH to connect from my local machine to the Digital Ocean server). When Deployer tries to run it, I get this error message: ➤ Executing task execphpfpm [1.5.6.6] > cd /root/laradock && (pwd;) [1.5.6.6] < /root

npm install on laradock not working

偶尔善良 提交于 2019-12-06 04:07:23
I created a Laravel project using Laradock. When I run npm install I get the following output. > node-sass@4.9.0 install /var/www/npmtest/node_modules/node-sass > node scripts/install.js fs.js:119 throw err; ^ Error: EINVAL: invalid argument, open '/var/www/npmtest/node_modules/node-sass/package.json' at Object.openSync (fs.js:443:3) at Object.readFileSync (fs.js:348:35) at Object.Module._extensions..json (internal/modules/cjs/loader.js:719:20) at Module.load (internal/modules/cjs/loader.js:612:32) at tryModuleLoad (internal/modules/cjs/loader.js:551:12) at Function.Module._load (internal

E_WARNING: Error while sending STMT_PREPARE packet. PID=*

泄露秘密 提交于 2019-12-04 10:26:33
问题 As of 2019-01-30 14:52 UTC, you can still win the 500-point Bounty because none of the answers have helped! My Laravel 5.7 website has been experiencing a few problems that I think are related to each other (but happen at different times): PDO::prepare(): MySQL server has gone away E_WARNING: Error while sending STMT_PREPARE packet. PID=10 PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry (My database often seems to try to write the same record twice in the

E_WARNING: Error while sending STMT_PREPARE packet. PID=*

╄→гoц情女王★ 提交于 2019-12-03 05:48:58
As of 2019-01-30 14:52 UTC, you can still win the 500-point Bounty because none of the answers have helped! My Laravel 5.7 website has been experiencing a few problems that I think are related to each other (but happen at different times): PDO::prepare(): MySQL server has gone away E_WARNING: Error while sending STMT_PREPARE packet. PID=10 PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry (My database often seems to try to write the same record twice in the same second. I've been unable to figure out why or how to reproduce it; it doesn't seem to be related to