2

Laradock搭建开发环境

 3 years ago
source link: https://segmentfault.com/a/1190000039803488
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

配置本地的 Laradock 环境(开发环境)

克隆 laradock 源代码到本地环境

在运行前需要安装docker环境

git clone https://github.com/laradock/laradock.git

创建 .env 文件

cp env-example-local .env

  • 可以据情况修改 .env 文件里的内容,以下是目前项目需要修改的配置。

WORKSPACE_COMPOSER_REPO_PACKAGIST=https://mirrors.aliyun.com/co... WORKSPACE_NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirror... ... WORKSPACE_INSTALL_MONGO=true
WORKSPACE_INSTALL_AMQP=true
WORKSPACE_INSTALL_SWOOLE=true

参考laradock项目中的README-zh.md文档说明

docker-compose build workspace mysql nginx redis elasticsearch mongo rabbitmq

  • 开启以下服务

docker-compose up -d workspace mysql nginx redis elasticsearch mongo rabbitmq

最后进入容器可以执行其他命令,如果Artisan等

docker-compose exec workspace bash


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK