fixes
This commit is contained in:
parent
c0f7b030a6
commit
77b3cb5d72
33
api/.dockerignore
Normal file
33
api/.dockerignore
Normal file
@ -0,0 +1,33 @@
|
||||
# python generated files
|
||||
__pycache__/
|
||||
*.py[oc]
|
||||
build/
|
||||
dist/
|
||||
wheels/
|
||||
*.egg-info
|
||||
|
||||
# venv
|
||||
.venv
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# ruff
|
||||
.ruff_cache/
|
||||
|
||||
# rye
|
||||
requirements-dev.lock
|
||||
|
||||
# alembic migrations
|
||||
alembic/versions
|
||||
|
||||
# Docker compose
|
||||
compose.yaml
|
||||
|
||||
# minio
|
||||
minio
|
||||
|
||||
# env (pass it thru compose)
|
||||
.env
|
@ -1,9 +1,9 @@
|
||||
FROM python:3.12
|
||||
|
||||
WORKDIR /src
|
||||
WORKDIR /api
|
||||
|
||||
RUN apt-get update && apt-get install make
|
||||
COPY Makefile requirements.lock pyproject.toml README.md /src/
|
||||
COPY Makefile requirements.lock pyproject.toml README.md /api/
|
||||
RUN make deps
|
||||
|
||||
COPY . .
|
||||
|
@ -1,3 +1,6 @@
|
||||
deps:
|
||||
pip install uv
|
||||
uv pip install --no-cache --system -r requirements.lock
|
||||
|
||||
run:
|
||||
fastapi run src/app.py --host 0.0.0.0
|
||||
|
@ -33,8 +33,8 @@ class DeviceProperties(BaseModel):
|
||||
estPurchaseDate: Optional[int] = None
|
||||
simLock: Optional[bool] = None # parameter is exist only in documentation
|
||||
warrantyStatus: Optional[str] = None
|
||||
repairCoverage: Union[bool, str] # I got bool, in documentation - str
|
||||
technicalSupport: Union[bool, str] # I got bool, in documentation - str
|
||||
repairCoverage: Union[bool, str, None] = None # I got bool, in documentation - str
|
||||
technicalSupport: Union[bool, str, None] = None # I got bool, in documentation - str
|
||||
replacement: Optional[bool] = None # parameter isn't exist in documentation
|
||||
demoUnit: Optional[bool] = None
|
||||
refurbished: Optional[bool] = None
|
||||
|
33
bot/.dockerignore
Normal file
33
bot/.dockerignore
Normal file
@ -0,0 +1,33 @@
|
||||
# python generated files
|
||||
__pycache__/
|
||||
*.py[oc]
|
||||
build/
|
||||
dist/
|
||||
wheels/
|
||||
*.egg-info
|
||||
|
||||
# venv
|
||||
.venv
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# ruff
|
||||
.ruff_cache/
|
||||
|
||||
# rye
|
||||
requirements-dev.lock
|
||||
|
||||
# alembic migrations
|
||||
alembic/versions
|
||||
|
||||
# Docker compose
|
||||
compose.yaml
|
||||
|
||||
# minio
|
||||
minio
|
||||
|
||||
# env (pass it thru compose)
|
||||
.env
|
@ -1,9 +1,9 @@
|
||||
FROM python:3.12
|
||||
|
||||
WORKDIR /src
|
||||
WORKDIR /bot
|
||||
|
||||
RUN apt-get update && apt-get install make
|
||||
COPY Makefile requirements.lock pyproject.toml README.md /src/
|
||||
COPY Makefile requirements.lock pyproject.toml README.md /bot/
|
||||
RUN make deps
|
||||
|
||||
COPY . .
|
||||
|
@ -1,3 +1,6 @@
|
||||
deps:
|
||||
pip install uv
|
||||
uv pip install --no-cache --system -r requirements.lock
|
||||
|
||||
run:
|
||||
python main.py
|
||||
|
@ -13,7 +13,7 @@ dependencies = [
|
||||
"requests>=2.32.3",
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">= 3.8"
|
||||
requires-python = ">= 3.12"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
@ -27,4 +27,4 @@ dev-dependencies = []
|
||||
allow-direct-references = true
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src"]
|
||||
packages = ["src/bot"]
|
||||
|
@ -12,7 +12,7 @@ services:
|
||||
start_period: 1s
|
||||
timeout: 600s
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 8005:8000
|
||||
|
||||
bot:
|
||||
container_name: hatiko-bot
|
||||
|
Loading…
x
Reference in New Issue
Block a user