Compare commits
No commits in common. "ccc153a870aa5865a0f65ffa40680e3409bd07c5" and "b298d95aabe7a27e6157f030914302abf8c3a8fd" have entirely different histories.
ccc153a870
...
b298d95aab
6 changed files with 0 additions and 41 deletions
15
Dockerfile
15
Dockerfile
|
@ -1,15 +0,0 @@
|
||||||
FROM python:3.12
|
|
||||||
|
|
||||||
MAINTAINER continuist
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY requirements.txt requirements.txt
|
|
||||||
RUN pip3 install -r requirements.txt
|
|
||||||
|
|
||||||
COPY ./start.py .
|
|
||||||
COPY ./app ./app
|
|
||||||
|
|
||||||
EXPOSE 5000
|
|
||||||
|
|
||||||
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "start:app"]
|
|
|
@ -1,7 +0,0 @@
|
||||||
from flask import Flask
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
|
||||||
|
|
||||||
@app.route("/")
|
|
||||||
def index():
|
|
||||||
return {"Hello": "World"}
|
|
|
@ -1,3 +0,0 @@
|
||||||
[pytest]
|
|
||||||
testpaths = tests
|
|
||||||
pythonpath = .
|
|
|
@ -1,2 +0,0 @@
|
||||||
flask
|
|
||||||
gunicorn
|
|
1
start.py
1
start.py
|
@ -1 +0,0 @@
|
||||||
from app.app import app
|
|
|
@ -1,13 +0,0 @@
|
||||||
import pytest
|
|
||||||
from app.app import app
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def client():
|
|
||||||
app.config['TESTING'] = True
|
|
||||||
with app.test_client() as client:
|
|
||||||
yield client
|
|
||||||
|
|
||||||
def test_index(client):
|
|
||||||
rv = client.get('/')
|
|
||||||
assert rv.status_code == 200
|
|
||||||
assert rv.get_json() == {"Hello": "World"}
|
|
Loading…
Add table
Reference in a new issue