File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# pull official base image
2- FROM python:3.9.0 -slim-buster
2+ FROM python:3.9.2 -slim-buster
33
44# set working directory
55WORKDIR /usr/src/app
Original file line number Diff line number Diff line change 33###########
44
55# pull official base image
6- FROM python:3.8.6 -slim-buster as builder
6+ FROM python:3.8.8 -slim-buster as builder
77
88# install system dependencies
99RUN apt-get update \
@@ -24,7 +24,7 @@ RUN pip wheel --no-cache-dir --no-deps --wheel-dir /usr/src/app/wheels -r requir
2424
2525# lint
2626COPY . /usr/src/app/
27- RUN pip install black==20.8b1 flake8===3.8.4 isort==5.6.4
27+ RUN pip install black==20.8b1 flake8===3.8.4 isort==5.7.0
2828RUN flake8 .
2929RUN black --exclude=migrations .
3030RUN isort .
@@ -35,7 +35,7 @@ RUN isort .
3535#########
3636
3737# pull official base image
38- FROM python:3.8.6 -slim-buster
38+ FROM python:3.8.8 -slim-buster
3939
4040# create directory for the app user
4141RUN mkdir -p /home/app
@@ -65,7 +65,7 @@ COPY --from=builder /usr/src/app/wheels /wheels
6565COPY --from=builder /usr/src/app/requirements.txt .
6666RUN pip install --upgrade pip
6767RUN pip install --no-cache /wheels/*
68- RUN pip install "uvicorn[standard]==0.13.1 "
68+ RUN pip install "uvicorn[standard]==0.13.4 "
6969
7070# add app
7171COPY . .
Original file line number Diff line number Diff line change 1+ # project/app/api/crud.py
2+
3+
14from typing import List , Union
25
36from app .models .pydantic import SummaryPayloadSchema
Original file line number Diff line number Diff line change 1+ # project/app/api/ping.py
2+
3+
14from fastapi import APIRouter , Depends
25
36from app .config import Settings , get_settings
Original file line number Diff line number Diff line change 1+ # project/app/config.py
2+
3+
14import logging
25import os
36from functools import lru_cache
Original file line number Diff line number Diff line change 1+ # project/app/db.py
2+
3+
14import logging
25import os
36
Original file line number Diff line number Diff line change 1+ # project/app/main.py
2+
3+
14import logging
25
36from fastapi import FastAPI
Original file line number Diff line number Diff line change 1+ # project/app/models/pydantic.py
2+
3+
14from pydantic import AnyHttpUrl , BaseModel
25
36
Original file line number Diff line number Diff line change 1+ # project/app/models/tortoise.py
2+
3+
14from tortoise import fields , models
25from tortoise .contrib .pydantic import pydantic_model_creator
36
Original file line number Diff line number Diff line change 1+ # project/tests/test_ping.py
2+
3+
14def test_ping (test_app ):
25 response = test_app .get ("/ping" )
36 assert response .status_code == 200
You can’t perform that action at this time.
0 commit comments