Skip to content

Commit edc0fb1

Browse files
committed
Update devfile parent to 3.0.0
Signed-off-by: thepetk <thepetk@gmail.com>
1 parent 52324dc commit edc0fb1

File tree

4 files changed

+29
-27
lines changed

4 files changed

+29
-27
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Creating an application with a Python code sample
22

3-
**Note:** The Python code sample uses the **8081** HTTP port.
3+
**Note:** The Python code sample version `1.0.2` uses the **8080** HTTP port.
44

55
Before you begin creating an application with this `devfile` code sample, it's helpful to understand the relationship between the `devfile` and `Dockerfile` and how they contribute to your build. You can find these files at the following URLs:
66

devfile.yaml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
'Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.
99
Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.'
1010
language: Python
11-
version: 1.0.1
11+
version: 1.0.2
1212
provider: Red Hat
1313
tags:
1414
- Python
@@ -20,38 +20,40 @@ metadata:
2020
parent:
2121
id: python
2222
registryUrl: 'https://registry.devfile.io'
23-
components:
24-
- name: image-build
23+
version: 3.0.0
24+
commands:
25+
- id: build-image
26+
apply:
27+
component: build
28+
- id: deployk8s
29+
apply:
30+
component: deploy
31+
- id: deploy
32+
composite:
33+
commands:
34+
- build-image
35+
- deployk8s
36+
group:
37+
kind: deploy
38+
isDefault: true
39+
components:
40+
- name: build
2541
image:
2642
imageName: python-image:latest
2743
dockerfile:
2844
uri: docker/Dockerfile
2945
buildContext: .
3046
rootRequired: false
31-
- name: kubernetes-deploy
47+
- name: deploy
3248
attributes:
3349
deployment/replicas: 1
3450
deployment/cpuRequest: 10m
3551
deployment/memoryRequest: 50Mi
36-
deployment/container-port: 8081
52+
deployment/container-port: 8080
3753
kubernetes:
38-
uri: deploy.yaml
54+
uri: kubernetes/deploy.yaml
3955
endpoints:
40-
- name: http-8081
41-
targetPort: 8081
56+
- name: http-8080
57+
targetPort: 8080
4258
path: /
43-
commands:
44-
- id: build-image
45-
apply:
46-
component: image-build
47-
- id: deployk8s
48-
apply:
49-
component: kubernetes-deploy
50-
- id: deploy
51-
composite:
52-
commands:
53-
- build-image
54-
- deployk8s
55-
group:
56-
kind: deploy
57-
isDefault: true
59+

docker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM registry.access.redhat.com/ubi9/python-39:1-117.1684741281
22

3-
# By default, listen on port 8081
4-
EXPOSE 8081/tcp
5-
ENV FLASK_PORT=8081
3+
# By default, listen on port 8080
4+
EXPOSE 8080/tcp
5+
ENV FLASK_PORT=8080
66

77
# Set the working directory in the container
88
WORKDIR /projects
File renamed without changes.

0 commit comments

Comments
 (0)