crates bootstrap
This commit is contained in:
1 parent
c2a5545a96
commit
a0eafda76c
3 files changed
+93
-63
No files matched your search
+44
-34
@@ -14,7 +14,7 @@ metadata:
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: crates-postgres-pvc
|
||||
name: crates-postgres-data
|
||||
namespace: crates
|
||||
spec:
|
||||
storageClassName: zfs-fast
|
||||
@@ -26,6 +26,20 @@ spec:
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: crates-postgres-bootstrap
|
||||
namespace: crates
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# DEPLOYMENTS
|
||||
# -----------------------------------------------------------------------
|
||||
@@ -69,28 +83,32 @@ spec:
|
||||
volumeMounts:
|
||||
- name: crates-postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
- name: crates-postgres-bootstrap
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
|
||||
volumes:
|
||||
- name: crates-postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: crates-postgres-pvc
|
||||
claimName: crates-postgres-data
|
||||
- name: crates-postgres-bootstrap
|
||||
persistentVolumeClaim:
|
||||
claimName: crates-postgres-bootstrap
|
||||
|
||||
---
|
||||
|
||||
# apiVersion: v1
|
||||
# kind: Pod
|
||||
# metadata:
|
||||
# name: nbody-gpu-benchmark
|
||||
# namespace: default
|
||||
# spec:
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: Pod
|
||||
metadata:
|
||||
namespace: crates
|
||||
name: crates-api
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: crates-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: crates-api
|
||||
spec:
|
||||
containers:
|
||||
- name: crates-api
|
||||
@@ -123,33 +141,25 @@ spec:
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
namespace: crates
|
||||
name: crates-migrate
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: crates-migrate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: crates-migrate
|
||||
spec:
|
||||
containers:
|
||||
- name: crates-migrate
|
||||
image: registry.ntwl.xyz/crates-api
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["npx"]
|
||||
args: ["prisma", "migrate", "deploy"]
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: crates
|
||||
key: DATABASE_URL
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: crates-migrate
|
||||
image: registry.ntwl.xyz/crates-api
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["npx"]
|
||||
args: ["prisma", "migrate", "deploy"]
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: crates
|
||||
key: DATABASE_URL
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user