|
|
před 6 roky | |
|---|---|---|
| normand | před 6 roky | |
| normandcrm | před 6 roky | |
| .gitignore | před 6 roky | |
| CRM项目整体架构.docx | před 6 roky | |
| README.md | před 6 roky | |
| normandmkt_crm.sql | před 6 roky | |
| normandmkt_offcial.sql | před 6 roky | |
| 项目流程(入金部分).docx | před 6 roky | |
| 项目流程(出金部分).docx | před 6 roky | |
| 项目流程(邮箱注册).docx | před 6 roky |
CRM项目多版本并行管理基础版本
首先,每个项目都是基于master分支进行开发部署的,当需要新开发部署一套项目时,在本地基于master分支创建一个以项目名命名的分支即可,如hyde:
git checkout -b swaggers master
添加追踪、提交,再推送至仓库:
git push origin swaggers
当master分支做了修改,想在分支也做同步修改时:
git checkout master #切换至主分支
git pull #拉取远程主分支代码
git checkout swaggers #切换至swaggers分支
git merge master #hyde分支合并
git push origin swaggers #推送至远程分支swaggers
远程主机配置:
在centos用户的家目录(即/home/centos/)下初始化一个空的Git仓库:
git init --bare swaggers.git
在web目录下做第一次检出:
cd /data/web/src/
sudo git clone /home/centos/swaggers.git
编写hook脚本
vim post-receive
#!/bin/sh
unset $(git rev-parse --local-env-vars)
cd /data/web/src/swaggers/
sudo git pull
(切记将post-receive脚本权限修改为可执行文件,777即可)
本地配置ssh(否则可能无法提交至远程主机)生成公钥私钥文件
ssh-keygen -t rsa -C "username"
将本地C:\Users\user.ssh\id_rsa.pub公钥文件内容复制至远程主机/home/centos/.ssh/authorized_keys文件中(不同用户的公钥文件换行保存)
当分支开发完毕,可以添加远程主机(主机名最好也与项目名称统一),并将分支推送至远程主机,再由远程主机上的hook脚本将项目检出至web目录:
git remote add giturl # 添加远程主机
如 git remote add swaggers centos@13.124.37.191:/home/centos/swaggers.git
git push [<host>] [<localbranch>][:<remotebranch>] #推送代码,host默认为origin,localbranch默认为当前分支,remotebranch默认为当前分支追踪的分支,当remotebranch不存在时,会在远程主机新建一个同名分支,省略localbranch时,表示删除指定的远程分支,等同于git push <host> --delete <remotebranch>,当前分支与远程分支之间存在追踪关系时,可省略localbranch和remotebranch.如git push hyde hyde:master
如 git push swaggers swaggers:master
git pull remotehost remotebranch localbranch 从remotehost主机拉取remotebranch分支代码到localbranch分支
git push [<host>] [<localbranch>][:<remotebranch>] 推送代码,host默认为origin,localbranch默认为当前分支,remotebranch默认为当前分支追踪的分支
当remotebranch不存在时,会在远程主机新建一个同名分支
省略localbranch时,表示删除指定的远程分支,等同于git push <host> --delete <remotebranch>
当前分支与远程分支之间存在追踪关系时,可省略localbranch和remotebranch
整个项目分为前台、后台,前台和后台又拆分为业务层和数据服务层
/CRM/normand 前台项目
/CRM/normand/fronted 前台业务层
/CRM/normand/service 前台服务层
/CRM/normandcrm 后台项目
/CRM/normandcrm/admin 后台管理系统业务层
/CRM/normandcrm/crm 后台用户、代理系统业务层
/CRM/normandcrm/service 后台服务层
业务层通用配置:
在/项目名/common/config/params.php中通过配置Url和ApiSecret来指定service层的请求地址,并通过service层的权限校验。
前台指向service层域名www.service.com,后台指向service层域名crm.service.com。线上和本地将service层域名写入host文件即可。
前台业务层配置:
在/normand/frontend/frontend/config/params.php中配置项目相关信息,如邮箱,公司名称,开户地址,用户/代理登陆地址,nfa等
服务层通用配置:
在/service/common/config/db.php中配置数据库相关信息
1、修改前台网站logo、项目信息配置、手机端PC端下载地址
2、crm后台更换logo图标,登录入口的文字更改(和网站的名字一样),客户相关的说明文件,pdf档
3、admin需要将发件的模板文字更改一下. 后续需要优化一些功能
4、Mt4:更改mt4的接口地址和端口。以及master字段(辨识的含义)
5、运维:开启定时脚本(入金扫描)