Complete the code to define the Flask app instance.
from flask import Flask app = Flask([1])
The Flask app instance is created by passing __name__ to the Flask constructor. This helps Flask know where to look for resources.
Complete the GitHub Actions workflow trigger to run on push to the main branch.
on:
push:
branches:
- [1]The workflow should trigger on pushes to the main branch, which is the default production branch in many projects.
Fix the error in the Dockerfile command to install dependencies from requirements.txt.
RUN pip install [1] requirements.txtThe correct pip option to install packages from a requirements file is -r.
Fill all three blanks to create a GitHub Actions job step that runs tests using pytest.
- name: Run tests run: [1] [2] [3]
To run pytest as a module, use python -m pytest. This ensures pytest runs in the Python environment.
Fill all three blanks to define a Dockerfile entrypoint that runs the Flask app.
ENTRYPOINT ["[1]", "-m", "[2]", "[3]"]
The entrypoint runs python -m flask run to start the Flask development server inside the container.