fix: 更新依赖包安装方式
This commit is contained in:
parent
59d4f098ea
commit
2ee8beb276
|
|
@ -5,6 +5,8 @@ on:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
paths:
|
paths:
|
||||||
- 'requirements.txt'
|
- 'requirements.txt'
|
||||||
|
- 'poetry.lock'
|
||||||
|
- 'pyproject.toml'
|
||||||
- 'RuntimeDockerfile'
|
- 'RuntimeDockerfile'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,22 @@ RUN mkdir /install
|
||||||
|
|
||||||
WORKDIR /install
|
WORKDIR /install
|
||||||
|
|
||||||
COPY requirements.txt .
|
# COPY requirements.txt .
|
||||||
|
COPY poetry.lock .
|
||||||
|
COPY pyproject.toml .
|
||||||
|
|
||||||
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list.d/debian.sources
|
# RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list.d/debian.sources
|
||||||
|
|
||||||
RUN apt-get update \
|
# RUN apt-get update \
|
||||||
&& apt-get install gcc -y \
|
# && apt-get install gcc -y \
|
||||||
&& apt-get clean
|
# && apt-get clean
|
||||||
|
|
||||||
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --prefix=/install
|
# RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --prefix=/install
|
||||||
|
RUN pip install -r poetry -i https://mirrors.aliyun.com/pypi/simple/
|
||||||
|
|
||||||
|
RUN poetry source add --priority=primary mirrors https://pypi.tuna.tsinghua.edu.cn/simple/
|
||||||
|
|
||||||
|
RUN poetry install -C /install
|
||||||
# 应用启动
|
# 应用启动
|
||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,25 @@
|
||||||
|
[tool.poetry]
|
||||||
|
name = "fastapi-app-template"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = ""
|
||||||
|
authors = ["chenwj113 <chenwj113@gmail.com>"]
|
||||||
|
license = "MIT"
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.10"
|
||||||
|
fastapi = "0.111.0"
|
||||||
|
sqlalchemy = "2.0.0"
|
||||||
|
aioredis = "2.0.1"
|
||||||
|
aiomysql = "0.1.1"
|
||||||
|
fastapi-plugins = "0.13.0"
|
||||||
|
|
||||||
|
|
||||||
|
[[tool.poetry.source]]
|
||||||
|
name = "mirrors"
|
||||||
|
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
|
||||||
|
priority = "primary"
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
from sqlalchemy import Column, DateTime, Integer, text
|
|
||||||
from sqlalchemy.dialects.mysql import VARCHAR
|
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
|
||||||
|
|
||||||
Base = declarative_base()
|
|
||||||
metadata = Base.metadata
|
|
||||||
|
|
||||||
|
|
||||||
class DevicesPlace(Base):
|
|
||||||
__tablename__ = 'devices_place'
|
|
||||||
__table_args__ = {'comment': '设备:地址表'}
|
|
||||||
|
|
||||||
id = Column(Integer, primary_key=True)
|
|
||||||
mid = Column(VARCHAR(10), nullable=False, index=True, comment='设备管理ID')
|
|
||||||
customer_account = Column(VARCHAR(12), nullable=False, index=True, comment='甲方')
|
|
||||||
region_id = Column(Integer, nullable=False, server_default=text("'0'"), comment='区域id')
|
|
||||||
building_id = Column(Integer, nullable=False, server_default=text("'0'"), comment='所在楼(建筑)的id,0为待定')
|
|
||||||
floor = Column(Integer, nullable=False, server_default=text("'0'"), comment='楼层,0为待定,可为负数')
|
|
||||||
place = Column(VARCHAR(50), comment='位置(通常是房间号)')
|
|
||||||
ctime = Column(DateTime, nullable=False, index=True, server_default=text("CURRENT_TIMESTAMP"), comment='记录创建时间')
|
|
||||||
utime = Column(DateTime, nullable=False, index=True, server_default=text("CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"), comment='记录更新时间')
|
|
||||||
Loading…
Reference in New Issue