Skip to content
Snippets Groups Projects
Commit 9483c00f authored by EduardoGonçalvesSilva's avatar EduardoGonçalvesSilva
Browse files

Merge branch 'main' of git.gibb.ch:ego153448/m293-webseite

parents ce1f9a53 fd85bdba
Branches
No related tags found
No related merge requests found
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-app
spec:
replicas: 2
selector:
matchLabels:
app: web-app
template:
metadata:
labels:
app: web-app
spec:
containers:
- name: web-server
image: nginx:latest
ports:
- containerPort: 80
volumeMounts:
- name: website-data
mountPath: /usr/share/nginx/html
volumes:
- name: website-data
hostPath:
path: /m293-webseite/
type: Directory
# Verwende eine spezifische Version von nginx (optional)
FROM nginx:alpine
# Kopiere nur die benötigten Dateien
COPY . /usr/share/nginx/html
# Stelle sicher, dass der Port 80 offen ist
EXPOSE 80
apiVersion: v1
kind: Service
metadata:
name: web-app-service
spec:
selector:
app: web-app
ports:
- protocol: TCP
port: 80
targetPort: 80
type: NodePort
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment