apiVersion: apps/v1
kind: Deployment
metadata:
  name: lomavuokraus-web
  namespace: ${K8S_NAMESPACE}
spec:
  replicas: 2
  selector:
    matchLabels:
      app: lomavuokraus-web
  template:
    metadata:
      labels:
        app: lomavuokraus-web
    spec:
      containers:
        - name: lomavuokraus-web
          image: ${K8S_IMAGE}
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 3000
          env:
            - name: NODE_ENV
              value: "production"
            # lisää tänne NEXT_PUBLIC_* yms.
          resources:
            requests:
              cpu: "100m"
              memory: "256Mi"
            limits:
              cpu: "500m"
              memory: "512Mi"
---
apiVersion: v1
kind: Service
metadata:
  name: lomavuokraus-web
  namespace: ${K8S_NAMESPACE}
spec:
  selector:
    app: lomavuokraus-web
  ports:
    - name: http
      port: 80
      targetPort: 3000
  type: ClusterIP

