Skip to content

Commit 524713f

Browse files
committed
updated dependencies
Signed-off-by: Paul Schultz <[email protected]>
1 parent dcd255b commit 524713f

File tree

4 files changed

+12
-23
lines changed

4 files changed

+12
-23
lines changed

.devfile/icon/python.png

-5.04 KB
Binary file not shown.

app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from flask import Flask
2-
from waitress import serve
32

43
app = Flask(__name__)
54

@@ -8,4 +7,4 @@ def hello():
87
return "Hello World!"
98

109
if __name__ == '__main__':
11-
serve(app, host='0.0.0.0', port=8080)
10+
app.run(port=8080,host='0.0.0.0')

docker/Dockerfile

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1-
####
2-
# This Dockerfile is used in order to build a container that runs the Spring Boot application
3-
#
4-
# Build the image with:
5-
#
6-
# docker build -f docker/Dockerfile -t python/sample-basic .
7-
#
8-
# Then run the container using:
9-
#
10-
# docker run -i --rm -p 8081:8081 python/sample-basic
11-
####
121
FROM python:slim
132

14-
WORKDIR /projects
3+
# By default, listen on port 8081
4+
EXPOSE 8081/tcp
155

16-
RUN python3 -m venv venv
17-
RUN . venv/bin/activate
6+
# Set the working directory in the container
7+
WORKDIR /projects
188

19-
# optimize image caching
9+
# Copy the dependencies file to the working directory
2010
COPY requirements.txt .
11+
12+
# Install any dependencies
2113
RUN pip install -r requirements.txt
2214

15+
# Copy the content of the local src directory to the working directory
2316
COPY . .
2417

25-
EXPOSE 8081
26-
CMD [ "waitress-serve", "--port=8081", "app:app"]
27-
18+
# Specify the command to run on container start
19+
CMD [ "python", "./app.py" ]

requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
Flask==2.0.0
2-
itsdangerous==2.0.1
3-
waitress==2.0.0
1+
Flask==2.1.0

0 commit comments

Comments
 (0)