Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
9 changes: 9 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions archivo1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Este es el primer archivo apra commitear
1 change: 1 addition & 0 deletions archivo2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Este es para que se diviertan leyendo
1 change: 1 addition & 0 deletions archivo3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Acá ya se está logrando resolver todo el examen, y sería el último commit