diff --git a/Dockerfile b/Dockerfile index 6137b27..6f1b62f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,12 @@ -FROM python:3.7.11-slim - +#ESTA ES L IMÁGEN EN DOCKER HUB +FROM python:3.7.11-slim +#ACÁ ES DONDE SE GUARDARÁ LA CREACIÓN DE LA IMAGEN WORKDIR /python-api - +#COPIAMOS EL ARCHIVO DE REQUERIMIENTOS COPY requirements.txt requirements.txt - +#INSTALAMOS LOS REQUERIMIENTOS RUN pip install -r requirements.txt - +#COPIAMOS TODO EL CÓDIGO COPY . . - +#EXPOSE EL PUERTO Y TODA LA DEFINICÓN DE LA CREACIÓN DE LA IMAGEN CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"] diff --git a/app.py b/app.py index 7042ec7..6b29bf1 100644 --- a/app.py +++ b/app.py @@ -30,6 +30,15 @@ def get_day(day_id): def post_days(): return jsonify({"success": True}), 201 +#ESTE ES EL MÉTODO GET QUE SE PIDIÓ +@app.route("/", methods=["GET"]) +def get_days(): + return True + +#ESTE ES EL MÉTODO POST QUE SE PIDIÓ +@app.route("/", methods=["POST"]) +def post_days(): + return f"Posted to / with method POST" if __name__ == "__main__": app.run(debug=True) diff --git a/archivo1.txt b/archivo1.txt new file mode 100644 index 0000000..9af7ef8 --- /dev/null +++ b/archivo1.txt @@ -0,0 +1 @@ +Este es el primer archivo apra commitear diff --git a/archivo2.txt b/archivo2.txt new file mode 100644 index 0000000..296cc53 --- /dev/null +++ b/archivo2.txt @@ -0,0 +1 @@ +Este es para que se diviertan leyendo diff --git a/archivo3.txt b/archivo3.txt new file mode 100644 index 0000000..6cee351 --- /dev/null +++ b/archivo3.txt @@ -0,0 +1 @@ +Acá ya se está logrando resolver todo el examen, y sería el último commit