Skip to content

Commit 3ed3873

Browse files
authored
Merge pull request #7 from testdrivenio/updates-mar2021
Updates mar2021
2 parents 32b3f94 + 06d357a commit 3ed3873

11 files changed

Lines changed: 32 additions & 5 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/ping.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# project/app/api/ping.py
2+
3+
14
from fastapi import APIRouter, Depends
25

36
from app.config import Settings, get_settings

project/app/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# project/app/config.py
2+
3+
14
import logging
25
import os
36
from functools import lru_cache

project/app/db.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# project/app/db.py
2+
3+
14
import logging
25
import os
36

project/app/main.py

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

36
from fastapi import FastAPI

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/app/models/tortoise.py

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

project/tests/test_ping.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# project/tests/test_ping.py
2+
3+
14
def test_ping(test_app):
25
response = test_app.get("/ping")
36
assert response.status_code == 200

0 commit comments

Comments
 (0)