First commit
commit
227a14ef0a
|
@ -0,0 +1,3 @@
|
|||
__pycache__/
|
||||
venv/
|
||||
docker-secret/
|
|
@ -0,0 +1,3 @@
|
|||
__pycache__/
|
||||
venv/
|
||||
docker-secret/
|
|
@ -0,0 +1,11 @@
|
|||
FROM python:3.8-slim-buster
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt requirements.txt
|
||||
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["python3", "-m", "flask", "run", "--host=0.0.0.0"]
|
|
@ -0,0 +1,8 @@
|
|||
from flask import Flask
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return "Hello world!!"
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: luka-app
|
||||
name: luka-app
|
||||
namespace: jsikubernetes
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: luka-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: luka-app
|
||||
spec:
|
||||
containers:
|
||||
- name: luka-app
|
||||
image: lukaboljevic/testapp:jsi
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
imagePullSecrets:
|
||||
- name: luka-test-app-creds
|
|
@ -0,0 +1,13 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: luka-service
|
||||
namespace: jsikubernetes
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app.kubernetes.io/name: luka-app
|
||||
ports:
|
||||
- port: 4567
|
||||
targetPort: 5000
|
||||
protocol: TCP
|
|
@ -0,0 +1,8 @@
|
|||
click==8.1.3
|
||||
Flask==2.2.2
|
||||
importlib-metadata==5.0.0
|
||||
itsdangerous==2.1.2
|
||||
Jinja2==3.1.2
|
||||
MarkupSafe==2.1.1
|
||||
Werkzeug==2.2.2
|
||||
zipp==3.10.0
|
Loading…
Reference in New Issue