crates bootstrap
This commit is contained in:
parent
09802a55c0
commit
560a2fc6a1
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
pvs/
|
||||
|
||||
*.sql
|
||||
*.sql.gz
|
||||
*.tar.gz
|
||||
*.secret.yaml
|
||||
ntwl.sublime-workspace
|
||||
|
||||
@ -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
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ metadata:
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: spacerace-postgres-pvc
|
||||
name: spacerace-postgres-data
|
||||
namespace: spacerace
|
||||
spec:
|
||||
storageClassName: zfs-fast
|
||||
@ -27,6 +27,20 @@ spec:
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: spacerace-postgres-bootstrap
|
||||
namespace: spacerace
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# DEPLOYMENTS
|
||||
# -----------------------------------------------------------------------
|
||||
@ -70,41 +84,46 @@ spec:
|
||||
volumeMounts:
|
||||
- name: spacerace-postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
- name: spacerace-postgres-bootstrap
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
|
||||
volumes:
|
||||
- name: spacerace-postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: spacerace-postgres-pvc
|
||||
claimName: spacerace-postgres-data
|
||||
- name: spacerace-postgres-bootstrap
|
||||
persistentVolumeClaim:
|
||||
claimName: spacerace-postgres-bootstrap
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spacerace-api
|
||||
namespace: spacerace
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: spacerace-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: spacerace-api
|
||||
spec:
|
||||
containers:
|
||||
- name: spacerace-api
|
||||
image: registry.ntwl.xyz/spacerace-api
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
env:
|
||||
- name: CONNECTIONSTRINGS__SPACERACE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: spacerace
|
||||
key: CONNECTIONSTRINGS__SPACERACE
|
||||
# apiVersion: apps/v1
|
||||
# kind: Deployment
|
||||
# metadata:
|
||||
# name: spacerace-api
|
||||
# namespace: spacerace
|
||||
# spec:
|
||||
# replicas: 1
|
||||
# selector:
|
||||
# matchLabels:
|
||||
# app: spacerace-api
|
||||
# template:
|
||||
# metadata:
|
||||
# labels:
|
||||
# app: spacerace-api
|
||||
# spec:
|
||||
# containers:
|
||||
# - name: spacerace-api
|
||||
# image: registry.ntwl.xyz/spacerace-api
|
||||
# imagePullPolicy: IfNotPresent
|
||||
# ports:
|
||||
# - containerPort: 80
|
||||
# env:
|
||||
# - name: CONNECTIONSTRINGS__SPACERACE
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: spacerace
|
||||
# key: CONNECTIONSTRINGS__SPACERACE
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user