This commit is contained in:
Philipp Rothmann 2022-03-02 16:10:17 +01:00
commit a35d70412c
8 changed files with 67 additions and 0 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
env
__pycache__
.git

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
env
__pycache__

4
Dockerfile Normal file
View file

@ -0,0 +1,4 @@
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
COPY requirements.txt /app
RUN pip install -r /app/requirements.txt
COPY ./app /app

17
README.md Normal file
View file

@ -0,0 +1,17 @@
# integrate
does what nobody else want's to do.
## Development
### Getting Started
```
python3 -m venv env
. ./env/bin/activate
pip3 install -r requirements.txt
./env/bin/uvicorn app.main:app --reload
```
pip freeze -l > requirements.txt

8
app/main.py Normal file
View file

@ -0,0 +1,8 @@
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello World"}

11
app/test.py Normal file
View file

@ -0,0 +1,11 @@
from fastapi.testclient import TestClient
from .main import app
client = TestClient(app)
def test_read_main():
response = client.get("/")
assert response.status_code == 200
assert response.json() == {"msg": "Hello World"}

11
docker-compose.yml Normal file
View file

@ -0,0 +1,11 @@
services:
app:
build: .
environment:
# APP_MODULE: app.main:app
# BIND: 0.0.0.0
# PORT: 80
LOG_LEVEL: debug
ports:
- 8080:80

11
requirements.txt Normal file
View file

@ -0,0 +1,11 @@
anyio==3.5.0
asgiref==3.5.0
click==8.0.4
fastapi==0.74.1
h11==0.13.0
idna==3.3
pydantic==1.9.0
sniffio==1.2.0
starlette==0.17.1
typing_extensions==4.1.1
uvicorn==0.17.5