From efc8901240c6121b511080a1470d4d9917ccafd0 Mon Sep 17 00:00:00 2001 From: popenc Date: Mon, 18 Mar 2024 13:00:25 -0400 Subject: [PATCH] deployment updates --- docker-compose.yml | 2 +- k8s/vb-nginx-pv.yml | 33 ------------------- k8s/vb-nginx-pvc.yml | 37 --------------------- k8s/vb-postgres-pv.yml | 16 --------- k8s/vb-postgres-pvc.yml | 18 ---------- k8s/vb-postgres-service.yml | 2 +- k8s/vb-pvcs.yml | 66 +++++++++++++++++++++++++++++++++++++ k8s/vb-pvs.yml | 60 +++++++++++++++++++++++++++++++++ vb_nginx/nginx.conf | 6 +++- 9 files changed, 133 insertions(+), 107 deletions(-) delete mode 100644 k8s/vb-nginx-pv.yml delete mode 100644 k8s/vb-nginx-pvc.yml delete mode 100644 k8s/vb-postgres-pv.yml delete mode 100644 k8s/vb-postgres-pvc.yml create mode 100644 k8s/vb-pvcs.yml create mode 100644 k8s/vb-pvs.yml diff --git a/docker-compose.yml b/docker-compose.yml index 4bb22ff..bc52ee5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: - "8080" volumes: - collected_static:/opt/collected_static - # - ./vb_django:/opt/app + - ./vb_django:/opt/app vb-dask-scheduler: restart: unless-stopped diff --git a/k8s/vb-nginx-pv.yml b/k8s/vb-nginx-pv.yml deleted file mode 100644 index c54e3af..0000000 --- a/k8s/vb-nginx-pv.yml +++ /dev/null @@ -1,33 +0,0 @@ -# apiVersion: v1 -# kind: PersistentVolume -# metadata: -# name: vb-nginx-certs-pv -# labels: -# type: local -# app: vb-nginx-certs -# spec: -# accessModes: -# - ReadWriteMany -# capacity: -# storage: 1Gi -# storageClassName: vb-nginx-certs -# hostPath: -# path: \D\\git\vb\nginx - -# --- - -# apiVersion: v1 -# kind: PersistentVolume -# metadata: -# name: vb-collected-static-pv -# labels: -# type: local -# app: vb-collected-static -# spec: -# accessModes: -# - ReadWriteMany -# capacity: -# storage: 1Gi -# storageClassName: vb-collected-static -# hostPath: -# path: \D\\git\vb\collected_static diff --git a/k8s/vb-nginx-pvc.yml b/k8s/vb-nginx-pvc.yml deleted file mode 100644 index f5dd58b..0000000 --- a/k8s/vb-nginx-pvc.yml +++ /dev/null @@ -1,37 +0,0 @@ -# apiVersion: v1 -# kind: PersistentVolumeClaim -# metadata: -# name: vb-nginx-certs-pvc -# namespace: qed-kube-dev -# labels: -# app: vb-nginx-certs -# spec: -# accessModes: -# - ReadWriteMany -# resources: -# requests: -# storage: 1Gi -# selector: -# matchLabels: -# release: "stable" -# name: vb-nginx-certs-pv - -# --- - -# apiVersion: v1 -# kind: PersistentVolumeClaim -# metadata: -# name: vb-collected-static-pvc -# namespace: qed-kube-dev -# labels: -# app: vb-collected-static -# spec: -# accessModes: -# - ReadWriteMany -# resources: -# requests: -# storage: 1Gi -# selector: -# matchLabels: -# release: "stable" -# name: vb-collected-static-pv \ No newline at end of file diff --git a/k8s/vb-postgres-pv.yml b/k8s/vb-postgres-pv.yml deleted file mode 100644 index cb95d05..0000000 --- a/k8s/vb-postgres-pv.yml +++ /dev/null @@ -1,16 +0,0 @@ -# apiVersion: v1 -# kind: PersistentVolume -# metadata: -# name: vb-postgres-pv -# labels: -# type: local -# app: vb-postgres -# spec: -# storageClassName: vb-postgres -# capacity: -# storage: 5Gi -# accessModes: -# - ReadWriteMany -# hostPath: -# # path: /host/app_data -# path: /D//git/vb/app_data \ No newline at end of file diff --git a/k8s/vb-postgres-pvc.yml b/k8s/vb-postgres-pvc.yml deleted file mode 100644 index 195ef2c..0000000 --- a/k8s/vb-postgres-pvc.yml +++ /dev/null @@ -1,18 +0,0 @@ -# apiVersion: v1 -# kind: PersistentVolumeClaim -# metadata: -# name: vb-postgres-pv-claim -# namespace: qed-kube-dev -# labels: -# app: vb-postgres -# spec: -# accessModes: -# - ReadWriteMany -# # storageClassName: efs-sc -# resources: -# requests: -# storage: 5Gi -# selector: -# matchLabels: -# release: "stable" -# name: "vb-postgres-pv" diff --git a/k8s/vb-postgres-service.yml b/k8s/vb-postgres-service.yml index bb43da4..805d8a1 100644 --- a/k8s/vb-postgres-service.yml +++ b/k8s/vb-postgres-service.yml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: postgres + name: vb-postgres namespace: qed-kube-dev spec: type: ClusterIP diff --git a/k8s/vb-pvcs.yml b/k8s/vb-pvcs.yml new file mode 100644 index 0000000..421de0f --- /dev/null +++ b/k8s/vb-pvcs.yml @@ -0,0 +1,66 @@ +# apiVersion: v1 +# kind: PersistentVolumeClaim +# metadata: +# name: vb-nginx-certs-pvc +# namespace: qed-kube-dev +# labels: +# app: vb-nginx-certs +# spec: +# accessModes: +# - ReadWriteMany +# # storageClassName: vb-nginx-certs +# # storageClassName: hostpath +# resources: +# requests: +# storage: 1Gi +# # volumeName: vb-nginx-certs-pv +# selector: +# matchLabels: +# release: "stable" +# name: vb-nginx-certs-pv + +# --- + +# apiVersion: v1 +# kind: PersistentVolumeClaim +# metadata: +# name: vb-collected-static-pvc +# namespace: qed-kube-dev +# labels: +# app: vb-collected-static +# spec: +# accessModes: +# - ReadWriteMany +# # storageClassName: vb-collected-static +# # storageClassName: hostpath +# resources: +# requests: +# storage: 1Gi +# # volumeName: vb-collected-static-pv +# selector: +# matchLabels: +# release: "stable" +# name: vb-collected-static-pv + +# --- + +# apiVersion: v1 +# kind: PersistentVolumeClaim +# metadata: +# name: vb-postgres-pv-claim +# namespace: qed-kube-dev +# labels: +# app: vb-postgres +# spec: +# accessModes: +# - ReadWriteMany +# # storageClassName: vb-postgres +# # storageClassName: hostpath +# # volumeName: vb-postgres-pv +# resources: +# requests: +# storage: 5Gi +# selector: +# matchLabels: +# release: "stable" +# name: "vb-postgres-pv" diff --git a/k8s/vb-pvs.yml b/k8s/vb-pvs.yml new file mode 100644 index 0000000..89ede87 --- /dev/null +++ b/k8s/vb-pvs.yml @@ -0,0 +1,60 @@ +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: vb-nginx-certs-pv +# labels: +# type: local +# app: vb-nginx-certs +# spec: +# accessModes: +# - ReadWriteMany +# capacity: +# storage: 1Gi +# # storageClassName: hostpath +# # claimRef: +# # name: vb-nginx-certs-pvc +# hostPath: +# # path: \D\\git\vb\nginx +# path: /run/desktop/mnt/host/c/Users/inick/GitHub/vb_kube/nginx_certs + +# --- + +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: vb-collected-static-pv +# labels: +# type: local +# app: vb-collected-static +# spec: +# accessModes: +# - ReadWriteMany +# capacity: +# storage: 1Gi +# # claimRef: +# # name: vb-collected-static-pvc +# # storageClassName: hostpath +# hostPath: +# # path: \D\\git\vb\collected_static +# path: /run/desktop/mnt/host/c/Users/inick/GitHub/vb_kube/collected_static + +# --- + +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: vb-postgres-pv +# labels: +# type: local +# app: vb-postgres +# spec: +# # storageClassName: hostpath +# capacity: +# storage: 5Gi +# accessModes: +# - ReadWriteMany +# # claimRef: +# # name: vb-postgres-pvc +# hostPath: +# # path: /host/app_data +# path: /run/desktop/mnt/host/c/Users/inick/GitHub/vb_kube/app_data \ No newline at end of file diff --git a/vb_nginx/nginx.conf b/vb_nginx/nginx.conf index 814fc0c..b66dfb6 100644 --- a/vb_nginx/nginx.conf +++ b/vb_nginx/nginx.conf @@ -21,7 +21,11 @@ server { alias /src/collected_static/vb/; } location /vb/assets/ { - alias /src/collected_static/vb/; + alias /src/collected_static/vb/assets/; + } + + location /assets/ { + alias /src/collected_static/vb/assets/; } location / {