Skip to content

Commit 13a5b4b

Browse files
committed
added Dockerfile and cloudbuild.yaml
1 parent 991ae70 commit 13a5b4b

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM python:3.8-slim
2+
3+
WORKDIR /app
4+
COPY requirements.txt ./
5+
RUN pip install --no-cache-dir -r requirements.txt
6+
7+
COPY . /app
8+
9+
ENV FLASK_APP=app.py
10+
EXPOSE 8080
11+
12+
CMD ["python", "app.py"]

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ serializeDataCompany()
6767

6868
7. **Access the Application**
6969

70-
Open your web browser and navigate to `http://localhost:5000/` to interact with the application.
70+
Open your web browser and navigate to `http://localhost:8080/` to interact with the application.
7171

7272
## Usage
7373

app.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,4 @@ def result():
112112
return render_template('result.html', final_result=final_result)
113113

114114
if __name__ == "__main__":
115-
# Run the Flask app with debug mode disabled for production
116-
app.run(debug=False)
115+
app.run(debug=False, host='0.0.0.0', port=8080)

cloudbuild.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
steps:
3+
- name: 'gcr.io/cloud-builders/docker'
4+
args:
5+
- build
6+
- '-t'
7+
- 'gcr.io/$PROJECT_ID/phe_app'
8+
- '.'
9+
images:
10+
- 'gcr.io/$PROJECT_ID/phe_app'

0 commit comments

Comments
 (0)