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

View file

@ -0,0 +1,14 @@
# Use an official Nginx image as the base image
FROM nginx:latest
# Remove default Nginx files
RUN rm -rf /usr/share/nginx/html/*
# Copy the project files to the Nginx default directory
COPY . /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start Nginx when the container starts
CMD ["nginx", "-g", "daemon off;"]

View file

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