Skip to content

Commit b999073

Browse files
author
lan-air
committed
完善 aiosqlite 异步数据库驱动
1 parent e5d18a5 commit b999073

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
FROM python:3.9.5
22
LABEL author="Lan"
33
LABEL email="[email protected]"
4-
LABEL version="1.0"
4+
LABEL version="1.4.2"
55

66

77
COPY . /app
88
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
99
RUN echo 'Asia/Shanghai' >/etc/timezone
1010
WORKDIR /app
11-
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
11+
RUN pip install -r requirements.txt
1212
EXPOSE 12345
1313
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "12345"]

database.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
Base = declarative_base()
1111

12+
Base.metadata.create_all(bind=engine)
13+
1214

1315
async def get_session():
1416
async with AsyncSession(engine, expire_on_commit=False) as s:

templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<meta name="description" content="{{description}}"/>
1111
<meta name="keywords" content="{{keywords}}"/>
1212
<meta name="generator" content="FileCodeBox"/>
13-
<meta name="template" content="Lan-V1.4.1"/>
13+
<meta name="template" content="Lan-V1.4.2"/>
1414
<style>
1515
.qu .el-button {
1616
width: 100px;

0 commit comments

Comments
 (0)