adding devops

used gemini to create the k8s/dockerfiles faster
This commit is contained in:
Smigz 2025-05-02 16:47:07 +00:00
parent 5c09c5a22f
commit 6c14a968c3
74 changed files with 2061 additions and 16 deletions

16
cv/devops/Dockerfile Normal file
View file

@ -0,0 +1,16 @@
# Use an official Nginx image as the base image
FROM nginx:latest
# Set the working directory to /app
WORKDIR /app
# Copy the HTML, CSS, and JavaScript files to the Nginx default directory
COPY index.html /usr/share/nginx/html/
COPY css/ /usr/share/nginx/html/css/
COPY assets/ /usr/share/nginx/html/assets/
# Expose port 80 to the outside world
EXPOSE 80
# Start Nginx
CMD ["nginx", "-g", "daemon off;"]

32
cv/devops/deployment.yaml Normal file
View file

@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: cv-deployment
spec:
replicas: 1
selector:
matchLabels:
app: cv
template:
metadata:
labels:
app: cv
spec:
containers:
- name: cv-app
image: ghcr.io/smiggiddy/odin-codeprojects/cv:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: cv-service
spec:
type: LoadBalancer
selector:
app: cv
ports:
- protocol: TCP
port: 80
targetPort: 80