Skip to content

Commit

Permalink
终版归档 (#30)
Browse files Browse the repository at this point in the history
* add dockerfile

* add dockerfile

* 归档内容

* 'Bump version: 0.1.8 → 1.0.1'

* [archive] version: v1.0 -> v1.0.1

* 添加终版说明

* 添加终版说明

* Update README.md

Co-authored-by: jianxin.lu <[email protected]>
  • Loading branch information
jeyrce and jianxin.lu authored Jan 12, 2022
1 parent 58407f9 commit 3739cbb
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.1.8
current_version = 1.0.1
commit = True
tag = True
tag_name = 'v{new_version}'
Expand Down
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# project
.venv/
.git/
.idea/
.DS_Store
*.lic
logs/


# Python
*.egg-info
*.egg
*.pyc
.cache/
build/
dist/

# pytest
.pytest_cache/

# files
*.log
22 changes: 16 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
FROM python:3.8.12 AS runner
FROM --platform=linux/amd64 python:3.8.12-slim AS runner
MAINTAINER [email protected]
WORKDIR /ishare
ADD . .
RUN pip install -r requirements.txt \
COPY . .
RUN /usr/local/bin/python -m pip install --upgrade pip && \
pip install -r requirements.txt \
-i https://mirrors.aliyun.com/pypi/simple/ \
--trusted-host mirrors.aliyun.com \
--no-cache-dir && python manager.py collectstatic
--no-cache-dir && \
python /ishare/manage.py collectstatic

EXPOSE 7777:7777
CMD ["/usr/local/bin/uwsgi", "--ini", "/ishare/confs/uwsgi/uwsgi-docker.ini"]
EXPOSE 7777
VOLUME /ishare/db.sqlite3 /ishare/media /ishare/STATIC
CMD ["python3", \
"manage.py", \
"runserver", \
"--noreload", \
"--insecure", \
"--no-color", \
"0.0.0.0:7777" \
]

13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
### 个人博客项目

[![Join the chat at https://gitter.im/Jeyrce/ishare](https://badges.gitter.im/Jeyrce/ishare.svg)](https://gitter.im/Jeyrce/ishare?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
**项目2022-01-01起归档,代码不再维护,网站内容也不再更新。届时网站原内容将转移至:http://blog.lujianxin.com/**

**项目2022-01-01起归档,代码不再维护,网站内容也不再更新。届时网站原内容将转移至:http://blog.lujianxin.com/**

**项目2022-01-01起归档,代码不再维护,网站内容也不再更新。届时网站原内容将转移至:http://blog.lujianxin.com/**


欢迎点个关注 ![微信公众号](./static/image/wxgzh.jpg) 谢谢!

Expand All @@ -10,8 +15,10 @@
感谢杨青姐的前端模板!

- 开发: 2019年03月08日 ~ 2019年04月08日
- 当前版本: `0.1.8`
- 上线: [https://www.lujianxin.com](https://www.lujianxin.com)
- 当前版本: `1.0.1` 终版
- 上线: [https://www.lujianxin.com](https://www.lujianxin.com) 该域名2022年之后仅作为个人主页使用
- 归档:2022-01-01 起该项目不再维护,网站内容也不再更新,内容迁移至 [http://blog.lujianxin.com/](http://blog.lujianxin.com/)
- 新域名: [https://ioseek.cn/](http://ioseek.cn/) 已启用,作为微信公众号pc索引使用

### 使用技术:

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.8
1.0.1
1 change: 0 additions & 1 deletion blog/templates/db/base/top/navibar.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ <h2 id="mnavh"><span class="navicon"></span></h2>
</ul>
<a href="javascript: void(0);" rel="nofollow">{{ b_cat }}</a>
</li>
<li><a href="javascript: doing();" class="doing">专题系列</a></li>
<li><a href="/x/msg.html">留言板</a></li>
<li><a href="{{ SITE.me }}" target="_blank">关于我</a></li>
<li><a href="/x/link.html">友情链接</a></li>
Expand Down
2 changes: 1 addition & 1 deletion ishare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
from __future__ import absolute_import, unicode_literals

__version__ = '0.1.8'
__version__ = '1.0.1'
__site__ = 'www.lujianxin.com'
__start__ = '2019-03-08'

79 changes: 33 additions & 46 deletions ishare/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@
SECRET_KEY = '7=2y6u_5e=3mx0ut5hct!4t)g7gjy@7j_r$-(jv0&#n%v+@p=!'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False

# 维护期间阻止用户登录后台产生新的数据
UPGRADING = False
UPGRADING = True

pymysql.install_as_MySQLdb()

ALLOWED_HOSTS = [
'www.lujianxin.com',
'127.0.0.1',
'blog.lujianxin.com',
]

SERVER = 'https://{}'.format(ALLOWED_HOSTS[0])
Expand Down Expand Up @@ -77,7 +78,7 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
# 以下是自定义中间件
'blog.my_middlewares.AllMethodSupportMiddleware',
'blog.my_middlewares.VisitCountMiddleware',
# 'blog.my_middlewares.VisitCountMiddleware',
# 以下是开启缓存中间件
# 'django.middleware.cache.CacheMiddleware',
]
Expand Down Expand Up @@ -213,14 +214,14 @@
'team': 'lujianxin.com',
'dns': ALLOWED_HOSTS[0],
'host': 'https://{}'.format(ALLOWED_HOSTS[0]),
'name': '陆鉴鑫的博客',
'me': 'https://me.lujianxin.com',
'author': "Jeeyshe",
'name': '信息展示',
'me': 'https://lujianxin.com',
'author': "Jeyrce.Lu",
'email': {
'jubao': '[email protected]',
'tougao': '[email protected]',
'support': '[email protected]',
'me': 'jeeyshe@gmail.com',
'jubao': '[email protected]',
'tougao': '[email protected]',
'support': '[email protected]',
'me': 'jeyrce@gmail.com',
},
# 工信部备案号
'icp': {
Expand Down Expand Up @@ -253,40 +254,26 @@
CACHE_MIDDLEWARE_SECONDS = 180
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHES = {
# 默认使用的库,session,csrf等存储
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/0",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"CONNECTION_POOL_KWARGS": {"max_connections": 100},
"COMPRESSOR": "django_redis.compressors.zlib.ZlibCompressor",
"PASSWORD": "lujianxin.com",
}
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
},
'one': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
},
# 重置密码token
"one": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"CONNECTION_POOL_KWARGS": {"max_connections": 100},
"COMPRESSOR": "django_redis.compressors.zlib.ZlibCompressor",
"PASSWORD": "lujianxin.com",
}
'two': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
},
# 2号3号库用作celery的任务队列

# 专做本站访问次数记录
"four": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/4",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"CONNECTION_POOL_KWARGS": {"max_connections": 10},
"PASSWORD": "lujianxin.com",
}
'three': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
},
'four': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
}

############
Expand All @@ -298,7 +285,7 @@
# Cookie name. This can be whatever you want.
SESSION_COOKIE_NAME = 'sessionid'
# Age of cookie, in seconds (default: 2 weeks).
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2
SESSION_COOKIE_AGE = 60 * 60
# The path of the session cookie.
SESSION_COOKIE_PATH = '/'
SESSION_EXPIRE_AT_BROWSER_CLOSE = not DEBUG
Expand All @@ -321,24 +308,24 @@
}

# ----------本站系统所用email配置----------
SERVER_EMAIL = '[email protected]'
SERVER_EMAIL = '[email protected]'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.exmail.qq.com'
EMAIL_PORT = 465

EMAIL_USE_LOCALTIME = False

# Optional SMTP authentication information for EMAIL_HOST.
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'lujianxin.com'
EMAIL_USE_TLS = False
EMAIL_USE_SSL = True
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = None
EMAIL_TIMEOUT = None

DEFAULT_FROM_EMAIL = '[email protected]'
EMAIL_SUBJECT_PREFIX = '[陆鉴鑫的博客]'
DEFAULT_FROM_EMAIL = '[email protected]'
EMAIL_SUBJECT_PREFIX = '[信息展示]'

LIST_INFO = {
'page_size': 30,
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ sorl-thumbnail==12.6.3
sqlparse==0.3.0
tablib==0.14.0
urllib3==1.25.8
uWSGI==2.0.18
vine==1.3.0
webencodings==0.5.1
xlrd==1.2.0
Expand Down
Binary file modified static/image/wxgzh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions static/js/egg.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* author: jeeyshe@gmail.com
* author: jeyrce@gmail.com
* date: 2019-04-09 00:34
* description: 埋藏在控制台的彩蛋
* */
Expand Down Expand Up @@ -48,6 +48,9 @@ function doing() {
}

$(document).ready(function () {
layer.msg('<h1>网站已归档不再更新内容,欢迎关注新站: </h1><h1>ioseek.cn</h1>', {
time: 3000, //3s后自动关闭
});
console.clear();
console.log("%c《青春》---塞缪尔•厄尔曼", "color: red;");
for (var index = 0; index < str.length; index++) {
Expand All @@ -56,11 +59,7 @@ $(document).ready(function () {
}
console.log('\r\n');
console.log("%c2019-04-09 00:40 https://www.lujianxin.com", "color: green;");

// for (i = 0; i < site_name.length; i++) {
// console.log(site_name[i], "color: blue;");
//}
console.log("%c~既然都发现这个彩蛋了,收藏一下本站呗^o^", "color: red;");

console.log("%c> 本站从2022-01-01日起不再维护和更新内容,欢迎前往新站: https://ioseek.cn", "color: green;");
});

0 comments on commit 3739cbb

Please sign in to comment.