diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4310217..a62fa28 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.8 +current_version = 1.0.1 commit = True tag = True tag_name = 'v{new_version}' diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f2ec19e --- /dev/null +++ b/.dockerignore @@ -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 diff --git a/Dockerfile b/Dockerfile index 3c9379c..9fa3613 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,22 @@ -FROM python:3.8.12 AS runner +FROM --platform=linux/amd64 python:3.8.12-slim AS runner MAINTAINER jeyrce@gmail.com 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" \ +] diff --git a/README.md b/README.md index 36823ee..6edf59e 100644 --- a/README.md +++ b/README.md @@ -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) 谢谢! @@ -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索引使用 ### 使用技术: diff --git a/VERSION b/VERSION index 699c6c6..7dea76e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.8 +1.0.1 diff --git a/blog/templates/db/base/top/navibar.html b/blog/templates/db/base/top/navibar.html index ee48033..4bd33e8 100644 --- a/blog/templates/db/base/top/navibar.html +++ b/blog/templates/db/base/top/navibar.html @@ -22,7 +22,6 @@ {{ b_cat }} -
  • 专题系列
  • 留言板
  • 关于我
  • 友情链接
  • diff --git a/ishare/__init__.py b/ishare/__init__.py index e1b3a45..1e7f132 100644 --- a/ishare/__init__.py +++ b/ishare/__init__.py @@ -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' diff --git a/ishare/settings.py b/ishare/settings.py index dce0780..aab662d 100644 --- a/ishare/settings.py +++ b/ishare/settings.py @@ -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]) @@ -77,7 +78,7 @@ 'django.middleware.clickjacking.XFrameOptionsMiddleware', # 以下是自定义中间件 'blog.my_middlewares.AllMethodSupportMiddleware', - 'blog.my_middlewares.VisitCountMiddleware', + # 'blog.my_middlewares.VisitCountMiddleware', # 以下是开启缓存中间件 # 'django.middleware.cache.CacheMiddleware', ] @@ -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': 'support@lujianxin.com', - 'tougao': 'support@lujianxin.com', - 'support': 'support@lujianxin.com', - 'me': 'jeeyshe@gmail.com', + 'jubao': 'admin@ioseek.cn', + 'tougao': 'admin@ioseek.cn', + 'support': 'admin@ioseek.cn', + 'me': 'jeyrce@gmail.com', }, # 工信部备案号 'icp': { @@ -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', + } } ############ @@ -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 @@ -321,7 +308,7 @@ } # ----------本站系统所用email配置---------- -SERVER_EMAIL = 'support@lujianxin.com' +SERVER_EMAIL = 'admin@ioseek.cn' EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.exmail.qq.com' EMAIL_PORT = 465 @@ -329,7 +316,7 @@ EMAIL_USE_LOCALTIME = False # Optional SMTP authentication information for EMAIL_HOST. -EMAIL_HOST_USER = 'support@lujianxin.com' +EMAIL_HOST_USER = 'admin@ioseek.cn' EMAIL_HOST_PASSWORD = 'lujianxin.com' EMAIL_USE_TLS = False EMAIL_USE_SSL = True @@ -337,8 +324,8 @@ EMAIL_SSL_KEYFILE = None EMAIL_TIMEOUT = None -DEFAULT_FROM_EMAIL = 'support@lujianxin.com' -EMAIL_SUBJECT_PREFIX = '[陆鉴鑫的博客]' +DEFAULT_FROM_EMAIL = 'admin@ioseek.cn' +EMAIL_SUBJECT_PREFIX = '[信息展示]' LIST_INFO = { 'page_size': 30, diff --git a/requirements.txt b/requirements.txt index 614dee0..c9324c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/static/image/wxgzh.jpg b/static/image/wxgzh.jpg index b5177b6..ed00bcc 100644 Binary files a/static/image/wxgzh.jpg and b/static/image/wxgzh.jpg differ diff --git a/static/js/egg.js b/static/js/egg.js index 6e1ef14..5e1aa3c 100644 --- a/static/js/egg.js +++ b/static/js/egg.js @@ -1,5 +1,5 @@ /* -* author: jeeyshe@gmail.com +* author: jeyrce@gmail.com * date: 2019-04-09 00:34 * description: 埋藏在控制台的彩蛋 * */ @@ -48,6 +48,9 @@ function doing() { } $(document).ready(function () { + layer.msg('

    网站已归档不再更新内容,欢迎关注新站:

    ioseek.cn

    ', { + time: 3000, //3s后自动关闭 + }); console.clear(); console.log("%c《青春》---塞缪尔•厄尔曼", "color: red;"); for (var index = 0; index < str.length; index++) { @@ -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;"); });