Skip to content

Commit

Permalink
feat: seojimin make container image (#63)
Browse files Browse the repository at this point in the history
Signed-off-by: SeoJimin <[email protected]>
  • Loading branch information
SeoJimin1234 authored Aug 3, 2024
1 parent 23f1082 commit 6fc7c3b
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 0 deletions.
10 changes: 10 additions & 0 deletions SeoJimin1234/Dockerfile
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"]
14 changes: 14 additions & 0 deletions SeoJimin1234/app.py
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)
4 changes: 4 additions & 0 deletions SeoJimin1234/charts/Chart.yaml
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
19 changes: 19 additions & 0 deletions SeoJimin1234/charts/templates/deployment.yaml
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
12 changes: 12 additions & 0 deletions SeoJimin1234/charts/templates/service.yaml
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
2 changes: 2 additions & 0 deletions SeoJimin1234/charts/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
image:
name: SeoJimin1234/seojimin-week-two:latest
2 changes: 2 additions & 0 deletions SeoJimin1234/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Flask==2.2.5
Werkzeug==2.2.3

0 comments on commit 6fc7c3b

Please sign in to comment.