diff --git a/services/api/Dockerfile b/services/api/Dockerfile index cc89528..6eea170 100644 --- a/services/api/Dockerfile +++ b/services/api/Dockerfile @@ -20,4 +20,4 @@ RUN set -eux \ && rm -rf /root/.cache/pip # copy project -COPY . /opt/fast_api/ \ No newline at end of file +COPY ./app /opt/fast_api/ \ No newline at end of file diff --git a/services/api/app/main.py b/services/api/app/main.py index c07d4eb..f66ff13 100644 --- a/services/api/app/main.py +++ b/services/api/app/main.py @@ -1,3 +1,4 @@ +import datetime as dt from fastapi import FastAPI app = FastAPI() @@ -5,4 +6,5 @@ app = FastAPI() @app.get('/ping') def pong(): - return {"ping": "pong!"} + now = dt.datetime.now(dt.timezone.utc) + return {"ping": "pong!", "now": now} diff --git a/services/api/dev_requirements.txt b/services/api/dev_requirements.txt index 4f935e2..328ebba 100644 --- a/services/api/dev_requirements.txt +++ b/services/api/dev_requirements.txt @@ -6,30 +6,28 @@ # appdirs==1.4.3 # via black attrs==19.3.0 # via black, pytest -black==19.10b0 +black==19.10b0 # via -r dev_requirements.in certifi==2019.11.28 # via requests chardet==3.0.4 # via requests click==7.0 # via black, pip-tools entrypoints==0.3 # via flake8 -flake8==3.7.9 +flake8==3.7.9 # via -r dev_requirements.in idna==2.8 # via requests -importlib-metadata==1.5.0 # via pluggy, pytest mccabe==0.6.1 # via flake8 more-itertools==8.2.0 # via pytest packaging==20.1 # via pytest pathspec==0.7.0 # via black -pip-tools==4.4.1 +pip-tools==4.4.1 # via -r dev_requirements.in pluggy==0.13.1 # via pytest py==1.8.1 # via pytest pycodestyle==2.5.0 # via flake8 pyflakes==2.1.1 # via flake8 pyparsing==2.4.6 # via packaging -pytest==5.3.5 +pytest==5.3.5 # via -r dev_requirements.in regex==2020.1.8 # via black -requests==2.22.0 +requests==2.22.0 # via -r dev_requirements.in six==1.14.0 # via packaging, pip-tools toml==0.10.0 # via black typed-ast==1.4.1 # via black urllib3==1.25.8 # via requests wcwidth==0.1.8 # via pytest -zipp==2.1.0 # via importlib-metadata diff --git a/services/api/requirements.txt b/services/api/requirements.txt index 8cc9320..f5ab592 100644 --- a/services/api/requirements.txt +++ b/services/api/requirements.txt @@ -4,16 +4,16 @@ # # pip-compile requirements.in # -asyncpg==0.20.1 +asyncpg==0.20.1 # via -r requirements.in, databases click==7.0 # via uvicorn -databases[postgresql]==0.2.6 -fastapi==0.48.0 +databases[postgresql]==0.2.6 # via -r requirements.in +fastapi==0.48.0 # via -r requirements.in h11==0.9.0 # via uvicorn httptools==0.0.13 # via uvicorn psycopg2-binary==2.8.4 # via databases pydantic==1.4 # via fastapi -sqlalchemy==1.3.13 +sqlalchemy==1.3.13 # via -r requirements.in, databases starlette==0.12.9 # via fastapi -uvicorn==0.11.2 +uvicorn==0.11.2 # via -r requirements.in uvloop==0.14.0 # via uvicorn websockets==8.1 # via uvicorn