您的位置 首页 php

使用laradock创建laravel本地开发环境

首先安装 docker for Windows,配置docker,更换docker国内镜像地址。

使用管理员打开 PowerShell ,使用 Git 克隆laradock,代码如下:

使用laradock创建laravel本地开发环境

切换到laradock目录,并复制文件env-example重命名为.env。

cd laradock

cp env-example .env

使用docker-compose创建容器,我这里等了好长时间,如果不成功重试几遍。

docker-compose up -d nginx mysql phpmyadmin redis workspace

使用laradock创建laravel本地开发环境

创建成功后,我们看一下容器是否都正常启动

使用laradock创建laravel本地开发环境

nginx正常启动,接下来我们修改.env文件确定你的项目地址

APP_CODE_PATH_HOST= (你的项目地址)

由于mysql的版本太高,对我的程序不兼容,我先修改mysql的版本,用户名和密码

MYSQL_VERSION=(你想使用的版本)MYSQL_DATABASE=(数据库名称)MYSQL_USER=(数据库登录用户名)MYSQL_PASSWORD=(密码)MYSQL_PORT=3306(端口号)MYSQL_ROOT_PASSWORD=root(默认root用户的密码)

由于数据库和nginx是在不同的容器下,再添加一行数据库容器的地址

DB_HOST=mysqlREDIS_HOST=redisQUEUE_HOST=beanstalkd

修改G:laradockmysql目录下的Dockerfile文件

ARG MYSQL_VERSION=(你要使用的版本号)

先停止容器

docker-compose down

删除现有 mysql数据库

rm -Force ~/.laradock/data/mysql

然后重建数据库

docker-compose build mysql

再重新启动所有容器,你就会发现数据库版本变了

docker-compose up -d nginx mysql phpmyadmin redis workspace

然后看看phpinfo()的情况

使用laradock创建laravel本地开发环境

phpmyadmin的访问地址是:

使用laradock创建laravel本地开发环境

文章来源:智云一二三科技

文章标题:使用laradock创建laravel本地开发环境

文章地址:https://www.zhihuclub.com/77377.shtml

关于作者: 智云科技

热门文章

评论已关闭

37条评论

  1. hey there and thank you for your info – I have certainly picked up something new from right here.
    I did however expertise a few technical issues using this site, as I
    experienced to reload the site lots of times previous to I could get it to load properly.
    I had been wondering if your web host is OK? Not that I’m complaining, but sluggish
    loading instances times will often affect your placement in google and can damage your high-quality score if advertising
    and marketing with Adwords. Well I am adding this RSS to my
    email and can look out for much more of your respective exciting
    content. Ensure that you update this again very soon.

  2. The Louvre ranked him tenth, but who would have thought that he would cialis without a doctor prescription reddit kill the top one when he changed his hands, which made the Louvre have to rank him

  3. Table 1 showed the characteristics of each trail The medication you purchase is not name brand, but instead generic

  4. In the current study, an outpatient malaria episode was defined as an episode that does not require hospital admission.

  5. The broader objective is to assess the concept of breast density as a biosensor of tamoxifen response and UST as a useful tool for making this determination

  6. All simulations start with no heterogeneity SD 0 and a fully sensitive population The study population involved nearly 9, 000 women in western Washington that were diagnosed between 1990 and 1998 with primary localized or regional stage cancer in one breast

  7. In contrast to the numerous long AОІ fibrils present following treatment with DMSO, we observed much shorter and fewer AОІ fibrils and aggregates following treatment with the reversal compounds Fig While across the board results are useful from a population perspective, examination of patterns of treatment response during the course of follow up and for subpopulations of patients is required to make progress and solidify consensus on how to treat individual patients

  8. Shift work Basic principles The effect of hypotonically induced taurine transport is sustained and can be fully reversed by returning to an isotonic condition, as also observed in glial and HeLa cells 8, 18

  9. He would name the commanding structure overlooking the Hudson River The Prospect but would live for only 12 more years after its construction

  10. A second element of potential importance in regulating the growth of prostate cancer cells is the serine threonine kinase, protein kinase C PKC

  11. These findings led the National Surgical Adjuvant Breast and Bowel Project to design and launch the Study of Tamoxifen and Raloxifene

  12. Another potential issue is bubble creation due to the vibration of the helicopter Excerpt What do u guys say will be most effective against water retention and gyno for a beginners cycle of test e 500mg week

  13. Eine randomisierte, placebokontrollierte Studie Antiinflammatory potential of seven plant extracts in the ultraviolet erythema test Botulinum toxin increases risk of UTI, raised post void residuals and need to CISC, especially amongst the elderly

  14. Rate- up The applicant might be offered a policy with a surcharged premium e Table 5 provides a summary of the Panel Recommendations for VTE

  15. Among 826 postmenopausal women with vulvo vaginal atrophy treated with ospemifene 30 or 60 mg or placebo daily for 12 weeks, symptoms of vaginal dryness and dyspareunia improved most with the higher dose of ospemifene, and adverse events were similar in the three groups except for hot flushes 9

  16. Triangles represent data from studies in which the ureter was ligated to abolish glomerular filtration Direct Stealth excision is the treatment of choice at Seattle Gynecomastia Center, along with liposuction of any diffuse breast fullness that co exists

  17. There s no scientific evidence that saliva tests to check hormone levels are useful in making custom compounded hormone therapies

  18. I am concerned that we may have sprayed him with warm water in a bottle with mold particles

  19. However, it seems there is some pretty negative studies associated with both compunds regarding hepatoxy

  20. Serious Use Alternative 1 rifabutin will decrease the level or effect of entrectinib by affecting hepatic intestinal enzyme CYP3A4 metabolism

  21. Commonly, elevation of serum triglyceride levels, in some cases with pancreatitis, may be associated with the use of Tamoxifen Aristo Koperna T, Schulz F

  22. Even though there was a decreased frequency of PTEN mutations in endometrial carcinoma from patients with tamoxifen exposure as opposed to the control groups, the results were not statistically significant

  23. 2001; 33 1887 1889 Also, 1 6 grams of EPA for 12 16 weeks or omega 3 fatty acids containing 4

网站地图