-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: seojimin make container image (#63)
Signed-off-by: SeoJimin <[email protected]>
- Loading branch information
1 parent
23f1082
commit 6fc7c3b
Showing
7 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM python:3.9-slim | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
COPY . . | ||
|
||
CMD ["python", "app.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from flask import Flask | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route('/api/v1/SeoJimin1234') | ||
def my_github_account(): | ||
return {"message": "This is SeoJimin1234"} | ||
|
||
@app.route('/healthcheck') | ||
def health_check(): | ||
return {"status": "Jimin is very healthy"} | ||
|
||
if __name__ == '__main__': | ||
app.run(host='0.0.0.0', port=8080) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v2 | ||
name: seojimin-week-two | ||
description: A Helm chart for week two assignment | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: seojimin-week-two | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: seojimin-week-two | ||
template: | ||
metadata: | ||
labels: | ||
app: seojimin-week-two | ||
spec: | ||
containers: | ||
- name: seojimin-week-two | ||
image: "{{ .Values.image.name }}" | ||
ports: | ||
- containerPort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: seojimin-week-two | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
nodePort: 30080 | ||
selector: | ||
app: seojimin-week-two |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
image: | ||
name: SeoJimin1234/seojimin-week-two:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Flask==2.2.5 | ||
Werkzeug==2.2.3 |