徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
yangsai f763d3d454 20241015 1 month ago
..
mysql 20241015 1 month ago
php 20241015 1 month ago
redis 20241015 1 month ago
README.md 20241015 1 month ago
docker-compose.yml 20241015 1 month ago

README.md

docker-compose 快速运行调试项目

没有nginx镜像配置,只能启动后端接口服务,查看前端需要npm运行前端

1、安装docker

docker 官网下载 https://www.docker.com/products/docker-desktop

或命令安装

curl -sSL https://get.daocloud.io/docker | sh

2、安装docker-compose

https://www.runoob.com/docker/docker-compose.html

3、配置mysql和redis连接信息

在项目根目录中创建.env文件,把下面的配置放入.env文件中

APP_DEBUG = false

[APP]
DEFAULT_TIMEZONE = Asia/Shanghai

[DATABASE]
TYPE = mysql
HOSTNAME = 192.168.10.1
DATABASE = crmeb
USERNAME = root
PASSWORD = 123456
HOSTPORT = 3306
CHARSET = utf8
DEBUG = true

[LANG]
default_lang = zh-cn

[REDIS]
REDIS_HOSTNAME = 192.168.10.10
PORT = 6379
REDIS_PASSWORD = 123456
SELECT = 0

4、运行docker-compose

需要在本地创建如下文件夹。如果已经存在不需要重新创建

/help/docker-compose/mysql/data
/help/docker-compose/mysql/log
/help/docker-compose/redis/data

进入help/docker-compose目录。执行如下命令

docker-compose up -d

5、导入安装SQL和创建安装文件

安装sql存放在/public/install/crmeb.sql文件,需要去手动执行。连接上MYSQL导入sql文件

创建public/install/install.lock 文件内为空就可以

连接容器Mysql,按照以下配置来进行链接

HOSTNAME = 127.0.0.1
DATABASE = crmeb
USERNAME = root
PASSWORD = 123456
HOSTPORT = 3366

6、调试访问服务

一定要携带端口进行访问

http://127.0.0.1:20699