This repository was archived by the owner on Aug 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +73
-1
lines changed Expand file tree Collapse file tree 3 files changed +73
-1
lines changed Original file line number Diff line number Diff line change 1
1
.idea /
2
2
* .pyc
3
- deveops /conf.py
3
+ # deveops/conf.py
4
4
migrations /
5
5
ops /
Original file line number Diff line number Diff line change @@ -105,5 +105,6 @@ $ python apps/manage.py migrate
105
105
# 启动服务
106
106
$ python apps/manage.py runserver &
107
107
# 默认启动在8000端口 你可能需要一个nginx做Web服务器
108
+ 请务必配置一下Nginx代理来限制project/media下的访问权限 否则会出现问题
108
109
```
109
110
## <a name =" whatcando " > 自运维功能实现 </a >
Original file line number Diff line number Diff line change
1
+ # -*- coding:utf-8 -*-
2
+ # !/usr/bin/env python
3
+ # Time 18-1-17
4
+ # Author Yo
5
+ # Email YoLoveLife@outlook.com
6
+
7
+ # 环境参数 识别运行环境是开发/生产/测试
8
+ ENVIRONMENT = 'DEVEL'
9
+
10
+ # 运行用户
11
+ RUN_USER = 'root'
12
+
13
+ # 数据库配置内容
14
+ DB_NAME = ''
15
+ DB_USER = ''
16
+ DB_PASSWD = ''
17
+ DB_HOST = ''
18
+ DB_PORT = '3306'
19
+
20
+ # Session配置
21
+ SESSION_COOKIE_AGE = 30 * 60
22
+
23
+ # SSH配置
24
+ SSH_TIMEOUT = 2
25
+
26
+ # Redis配置
27
+ REDIS_HOST = ''
28
+ REDIS_PORT = 6379
29
+ REDIS_SPACE = 3
30
+ REDIS_PASSWD = ''
31
+
32
+ # 相关目录配置
33
+ MEDIA_ROOT = '/media'
34
+ OPS_ROOT = '/ops'
35
+ WORK_ROOT = '/work'
36
+ DASHBOARD_ROOT = '/dashboard'
37
+ QCODE_ROOT = '/qrcode'
38
+ TOOL_ROOT = '/tool'
39
+
40
+ # LDAP配置
41
+ LDAP_SERVER = ""
42
+ LDAP_PASSWD = ""
43
+ LDAP_OU = ''
44
+
45
+ # VMWARE配置
46
+ VMWARE_USERNAME = ""
47
+ VMWARE_PASSWD = ""
48
+ VMWARE_SERVER = ""
49
+
50
+ # ALiyun配置
51
+ ALIYUN_ACCESSKEY = ""
52
+ ALIYUN_ACCESSSECRET = ""
53
+ ALIYUN_PAGESIZE = 10
54
+ EXPIREDTIME = 10
55
+
56
+ # SMTP配置
57
+ SMTP_HOST = ''
58
+ SMTP_PORT = 29
59
+ SMTP_USER = ''
60
+ SMTP_PASSWD = ''
61
+
62
+ # DNS服务器
63
+ INNER_DNS = ''
64
+ OUTER_DNS = ''
65
+
66
+ # Crontab 配置
67
+ from celery .schedules import crontab
68
+ DASHBOARD_TIME = crontab (minute = 30 ,hour = 1 ,day_of_week = "sunday" )
69
+ EXPIRED_TIME = crontab (minute = 30 ,hour = 1 )
70
+ MANAGER_TIME = crontab (minute = 50 ,hour = 7 )
71
+ DNS_TIME = crontab (minute = '*' )
You can’t perform that action at this time.
0 commit comments