-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #287 from Hopetree/latest
Latest
- Loading branch information
Showing
76 changed files
with
8,933 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM python:3.9-slim | ||
|
||
# 国内用户构建命令参考 | ||
# DOCKER_BUILDKIT=0 docker build --build-arg pip_index_url=http://mirrors.aliyun.com/pypi/simple/ --build-arg pip_trusted_host=mirrors.aliyun.com --build-arg debian_host=mirrors.ustc.edu.cn -f Dockerfile-slim -t hopetree/izone:lts . | ||
|
||
# 默认的系统源和pypi源都使用国外的,国内构建的时候可以用命令行参数替换成国内源 | ||
ARG debian_host=deb.debian.org | ||
ARG pip_index_url=https://pypi.org/simple | ||
ARG pip_trusted_host=pypi.org | ||
|
||
|
||
ENV PYTHONUNBUFFERED=1 | ||
WORKDIR /opt/cloud/izone | ||
|
||
# 替换系统源,要注意这里不同版本的debian源文件不同 | ||
RUN sed -i "s/deb.debian.org/${debian_host}/g" /etc/apt/sources.list.d/debian.sources | ||
|
||
# 安装sqlclient的依赖,slim镜像中缺少 | ||
RUN apt-get update && apt-get install -y \ | ||
default-libmysqlclient-dev \ | ||
build-essential \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | ||
COPY requirements.txt requirements.txt | ||
RUN pip install --no-cache-dir -r requirements.txt --index-url $pip_index_url --trusted-host $pip_trusted_host | ||
RUN mkdir -p log && chmod -R 755 log | ||
|
||
COPY . . | ||
|
||
# 设置镜像的创建时间,当做网站更新时间 | ||
RUN sed -i "s/web_update_time=\"\"/web_update_time=\"$(date +'%Y-%m-%d %H:%M')\"/g" ./apps/blog/templates/blog/base.html | ||
|
||
CMD ["supervisord", "-n", "-c", "supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Generated by Django 2.2.28 on 2024-03-26 09:25 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('blog', '0018_auto_20240101_1903'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='MenuLink', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(help_text='如:Github 主页', max_length=20, unique=True, verbose_name='名称')), | ||
('icon', models.CharField(help_text='如:fa-github', max_length=20, unique=True, verbose_name='图标')), | ||
('link', models.CharField(max_length=200, unique=True, verbose_name='链接')), | ||
('title', models.CharField(help_text='外链的描述', max_length=50, unique=True, verbose_name='标题')), | ||
('active', models.BooleanField(default=True, help_text='是展示有效的链接', verbose_name='是否有效')), | ||
('sort_order', models.IntegerField(default=99, help_text='作为显示的时候的顺序', verbose_name='排序')), | ||
], | ||
options={ | ||
'verbose_name': '菜单外链', | ||
'verbose_name_plural': '菜单外链', | ||
'ordering': ['sort_order'], | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.2.28 on 2024-04-09 13:09 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('blog', '0019_menulink'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='carousel', | ||
name='content', | ||
field=models.CharField(blank=True, max_length=80, null=True, verbose_name='描述'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,6 +158,11 @@ | |
|
||
blockquote { | ||
margin: 0 0 .5em; | ||
font-style: italic; | ||
} | ||
|
||
blockquote p { | ||
margin-bottom: 0; | ||
} | ||
|
||
pre { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.