Skip to content

Commit

Permalink
feat: 更新配置
Browse files Browse the repository at this point in the history
  • Loading branch information
TigerZH committed Apr 24, 2022
1 parent 56d0175 commit 8ff1693
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 70 deletions.
72 changes: 72 additions & 0 deletions src/log/跨境电商.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,77 @@
# 跨境电商

```bash
# 进入服务器
ssh c18e
# 进入后台环境
cd /data/c18e/backend \
&& source .env/bin/activate
# 同步数据库
python3 manage.py makemigrations \
&& python3 manage.py migrate
# 重启服务
uwsgi --stop application/c18e.pid \
&& uwsgi -d --ini application/uwsgi.ini

服务器配置

配置ip 43.130.64.32
拷贝nginx配置文件
cp /etc/nginx/conf.d/talldu.com.conf /etc/nginx/conf.d/cmk-service.com.conf
上传nginx参数
scp -r /Users/zh/Documents/workspace/c18e/cert/www.cmk-service.com_nginx/* c18e:/etc/nginx/cert
```

## 2022-04-20

- 添加首页视频

## 2022-04-19

- 添加介绍官网

## 2022-04-18

- 添加导出excel功能
- 解决最大上传错误
- 修复bug

## 2022-04-17

- 添加概率策略
- 添加抽奖规则
- 解决最大上传错误

## 2022-04-16

- 修改抽奖为九宫格版本

## 2022-04-15

- 修改抽奖为老虎机版本

## 2022-04-14

- 添加大转盘

## 2022-04-13

- 完善首页提示语句
- 修改添加礼物页

## 2022-04-12

- 修改第二版抽奖样式
- 后台修改抽奖地址

## 2022-04-11

- 添加炫酷红包

- 图片抽奖



## 2022-04-10

- 添加产品模块
Expand Down
70 changes: 0 additions & 70 deletions src/note/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,76 +10,6 @@
mkdir drf-getting-start && cd drf-getting-start && virtualenv env && source env/bin/activate && pip install django && pip install djangorestframework && django-admin.py startproject apps . && python manage.py migrate && python manage.py createsuperuser
```

## deploy

```javascript
#!/usr/bin/env node
var exec = require("child_process").exec;
// 此脚本仅适用个人
var ora = require("ora");
const inquirer = require("inquirer");
const dayjs = require("dayjs");
const _package = require("../package.json");
// 当前版本
const version = _package.version;
// 当前时间
const now = dayjs().format("YYYYMMDDHHmmss");
// 项目目录
const dir_path = `/Users/tigerzh/Documents/workspace/shopify/c18e/front/dist`;
// 服务器nginx部署前端地址
const target_path = `/data/admin`;
// 版本目录
const version_path = `${dir_path}-${version}-${now}`;


const params = [
{
type: "rawlist",
name: "commit",
message: "请选择部署环境:",
default: "stage",
choices: [
"stage: https://form.tigerzh.com",
"production: https://form.tigerzh.com/",
],
},
];
const commendStage = `
yarn build:stage;
cp -r ${dir_path} ${version_path};
scp -r ${dir_path} c18e:${target_path};
scp -r ${version_path} c18e:${target_path};
rm -rf ${version_path};
`;

const commendProduction = `
yarn build:prod;
cp -r ${dir_path} ${version_path};
scp -r ${dir_path} c18e:${target_path};
scp -r ${version_path} c18e:${target_path};
rm -rf ${version_path};
`;

inquirer.prompt(params).then(async (answers) => {
const commit = answers.commit;
const spinner = ora({
text: `[${commit}]:部署中...`,
}).start();
const commend = commit.startsWith("production")
? commendProduction
: commendStage;
exec(commend, function (err) {
if (err) throw err;
spinner.succeed("部署完成");
spinner.succeed(Date());
});
});

```



## Setup

```python
Expand Down

0 comments on commit 8ff1693

Please sign in to comment.