Skip to content

Commit 2425908

Browse files
committed
add routes
1 parent 35ec014 commit 2425908

7 files changed

Lines changed: 17 additions & 7 deletions

File tree

project/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
55
WORKDIR /usr/src/app

project/Dockerfile.prod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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
99
RUN 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
2626
COPY . /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
2828
RUN flake8 .
2929
RUN black --exclude=migrations .
3030
RUN 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
4141
RUN mkdir -p /home/app
@@ -65,7 +65,7 @@ COPY --from=builder /usr/src/app/wheels /wheels
6565
COPY --from=builder /usr/src/app/requirements.txt .
6666
RUN pip install --upgrade pip
6767
RUN 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
7171
COPY . .

project/app/api/crud.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# project/app/api/crud.py
2+
3+
14
from typing import List, Union
25

36
from app.models.pydantic import SummaryPayloadSchema

project/app/api/summaries.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# project/app/api/summaries.py
2+
3+
14
from typing import List
25

36
from fastapi import APIRouter, BackgroundTasks, HTTPException, Path
@@ -12,7 +15,6 @@
1215
SummaryUpdatePayloadSchema,
1316
)
1417

15-
1618
router = APIRouter()
1719

1820

project/app/models/pydantic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# project/app/models/pydantic.py
2+
3+
14
from pydantic import AnyHttpUrl, BaseModel
25

36

project/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
asyncpg==0.22.0
32
fastapi==0.63.0
43
gunicorn==20.0.4

project/tests/test_summaries.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# project/tests/test_summaries.py
2+
3+
14
import json
25

36
import pytest

0 commit comments

Comments
 (0)