Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.9

COPY ./src /app/src
COPY requirements.txt /app

RUN pip3 install -r /app/requirements.txt

WORKDIR /app/src

EXPOSE 3001

CMD ["uvicorn", "main:app", "--host=0.0.0.0", "--port=3001"]
24 changes: 24 additions & 0 deletions k8s/mini-api-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# @Author: Chris Nicolaescu
# @Date: 2024-01-07
# @Last Modified by:
# @Last Modified time:
apiVersion: v1
kind: Pod
metadata:
name: mini-api-pod
labels:
app: mini-api
spec:
containers:
- name: mini-api
image: harbor.patras5g.eu/5gasp/mini-api-server:latest-x86
ports:
- name: http
containerPort: 3001
protocol: TCP
# command:
# - "/bin/sh"
# - "-c"
# - "tail -f /dev/null"

19 changes: 19 additions & 0 deletions k8s/mini-api-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# @Author: Chris Nicolaescu
# @Date: 2024-01-07
# @Last Modified by:
# @Last Modified time:
apiVersion: v1
kind: Service
metadata:
name: mini-api-svc
spec:
type: NodePort
ports:
- port: 31001
targetPort: 3001
nodePort: 31001
protocol: TCP
name: mini-api
selector:
app: mini-api