Skip to content

Commit

Permalink
added db
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryce Coon committed Apr 4, 2024
1 parent 6f57f5a commit 1e1a2f0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/brycerunner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
ls -la
docker build -t 144.17.92.12:5000/bryce2/blazor-web:1 .
docker push 144.17.92.12:5000/bryce2/blazor-web:1
kubectl -n bryce2 create configmap blazor-web-postgres-init --from-file=20240215.01.21.01.sql
kubectl apply -f kube/
Expand Down
14 changes: 8 additions & 6 deletions kube/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -19,6 +19,8 @@ metadata:
app: blazor-web-db
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: blazor-web-db
Expand All @@ -42,15 +44,15 @@ spec:
volumeMounts:
- name: postgresstorage
mountPath: /var/lib/postgresql/data
# - name: init-script
# mountPath: /docker-entrypoint-initdb.d
- name: init-script
mountPath: /docker-entrypoint-initdb.d
volumes:
- name: postgresstorage
persistentVolumeClaim:
claimName: blazor-web-db-pvc
# - name: init-script
# configMap:
# name: blazor-web-postgres-init
- name: init-script
configMap:
name: blazor-web-postgres-init
---
apiVersion: v1
kind: Service
Expand Down
5 changes: 4 additions & 1 deletion kube/web-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ spec:
- name: blazor-web
image: 144.17.92.12:5000/bryce2/blazor-web:1
ports:
- containerPort: 8080
- containerPort: 8080
env:
- name: MYDATABASECONNECTIONSTRING
value: Server=blazor-web-db-service;password=postgres;user id=postgres;database=postgres;

0 comments on commit 1e1a2f0

Please sign in to comment.