commit 0319d5a23af79c4593ae037b5c0d447d638eea09
Author: Jakub Smid <jaksmid@seznam.cz>
Date:   Mon Apr 11 13:14:03 2022 +0200

    Configuration files for kubernetes
    
    re #9333

diff --git a/backend/app-deployment.yaml b/backend/app-deployment.yaml
index faaefad..3c62d8a 100644
--- a/backend/app-deployment.yaml
+++ b/backend/app-deployment.yaml
@@ -30,7 +30,7 @@ spec:
           image: app
           name: app-backend
           ports:
-            - containerPort: 8080
+            - containerPort: 8000
           resources: {}
       restartPolicy: Always
 status: {}
diff --git a/backend/app-service.yaml b/backend/app-service.yaml
index 83d948e..d39f431 100644
--- a/backend/app-service.yaml
+++ b/backend/app-service.yaml
@@ -10,9 +10,9 @@ metadata:
   name: app
 spec:
   ports:
-    - name: "8080"
-      port: 8080
-      targetPort: 8080
+    - name: "8000"
+      port: 8000
+      targetPort: 8000
   selector:
     io.kompose.service: app
 status:
diff --git a/backend/db-deployment.yaml b/backend/db-deployment.yaml
index 6e1abaf..71fc1ad 100644
--- a/backend/db-deployment.yaml
+++ b/backend/db-deployment.yaml
@@ -13,7 +13,8 @@ spec:
   selector:
     matchLabels:
       io.kompose.service: db
-  strategy: {}
+  strategy:
+    type: Recreate
   template:
     metadata:
       annotations:
@@ -35,6 +36,13 @@ spec:
           name: postgres-db
           ports:
             - containerPort: 5432
-          resources: {}
+          resources: { }
+          volumeMounts:
+            - mountPath: /var/lib/postgresql/data
+              name: db-data
       restartPolicy: Always
+      volumes:
+        - name: db-data
+          persistentVolumeClaim:
+            claimName: db-data
 status: {}
diff --git a/backend/docker-compose.yml b/backend/docker-compose.yml
index ffa2482..e48fcb6 100644
--- a/backend/docker-compose.yml
+++ b/backend/docker-compose.yml
@@ -12,17 +12,27 @@ services:
       - 5432
     ports:
       - "5432:5432"                # expose port 5432 (PostgreSQL) out of the docker container to the local machine
+    volumes:
+      - db-data:/var/lib/postgresql/data
 
 
   app: # Spring boot application
     build: .
     container_name: app-backend  # name of the container
     ports:
-      - "8080:8080"                 # expose port 8080 out of the docker container do the local machine
+      - "8000:8000"                 # expose port 8080 out of the docker container do the local machine
     depends_on:
       - db
     environment:
       - SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/test # overwrites application.properties datasource url to connect to the database
 
+  frontend:
+    # Since our Dockerfile for web-server is located in react-app foler, our build context is ./react-app
+    build: ../frontend
+    container_name: frontend
+    image: schwobik/frontend-app:1.0
+    ports:
+      - "8080:8080"
+
 volumes:
   db-data:
\ No newline at end of file
diff --git a/backend/frontend-deployment.yaml b/backend/frontend-deployment.yaml
new file mode 100644
index 0000000..a2a647a
--- /dev/null
+++ b/backend/frontend-deployment.yaml
@@ -0,0 +1,33 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  annotations:
+    kompose.cmd: kompose convert
+    kompose.version: 1.26.0 (40646f47)
+  creationTimestamp: null
+  labels:
+    io.kompose.service: frontend
+  name: frontend
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      io.kompose.service: frontend
+  strategy: { }
+  template:
+    metadata:
+      annotations:
+        kompose.cmd: kompose convert
+        kompose.version: 1.26.0 (40646f47)
+      creationTimestamp: null
+      labels:
+        io.kompose.service: frontend
+    spec:
+      containers:
+        - image: schwobik/frontend-app:1.0
+          name: frontend
+          ports:
+            - containerPort: 8080
+          resources: { }
+      restartPolicy: Always
+status: { }
diff --git a/backend/frontend-service.yaml b/backend/frontend-service.yaml
new file mode 100644
index 0000000..11af9de
--- /dev/null
+++ b/backend/frontend-service.yaml
@@ -0,0 +1,19 @@
+apiVersion: v1
+kind: Service
+metadata:
+  annotations:
+    kompose.cmd: kompose convert
+    kompose.version: 1.26.0 (40646f47)
+  creationTimestamp: null
+  labels:
+    io.kompose.service: frontend
+  name: frontend
+spec:
+  ports:
+    - name: "8080"
+      port: 8080
+      targetPort: 8080
+  selector:
+    io.kompose.service: frontend
+status:
+  loadBalancer: { }
