Skip to content

Commit 0694909

Browse files
authored
Merge pull request #3 from joshdavidson/feature/2-database-separation
Removing databases from app deployments.
2 parents 10f037f + c15b9d0 commit 0694909

18 files changed

+28
-302
lines changed

bookstack/bookstack-deployment.yaml

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ spec:
2121
- name: PGID
2222
value: "1000"
2323
- name: DB_HOST
24-
value: "bookstack-db"
24+
value: "mariadb"
2525
- name: DB_USER
26-
value: "bookstack"
26+
value: "root"
2727
- name: DB_PASS
28-
value: "bookstack"
28+
value: "password"
2929
- name: DB_DATABASE
3030
value: "bookstackapp"
3131
- name: APP_URL
@@ -42,52 +42,4 @@ spec:
4242
volumes:
4343
- name: bookstack
4444
persistentVolumeClaim:
45-
claimName: bookstack
46-
---
47-
apiVersion: apps/v1
48-
kind: Deployment
49-
metadata:
50-
labels:
51-
app: bookstack-db
52-
name: bookstack-db
53-
spec:
54-
replicas: 1
55-
selector:
56-
matchLabels:
57-
app: bookstack-db
58-
strategy:
59-
type: Recreate
60-
template:
61-
metadata:
62-
labels:
63-
app: bookstack-db
64-
spec:
65-
containers:
66-
- env:
67-
- name: PUID
68-
value: "1000"
69-
- name: PGID
70-
value: "1000"
71-
- name: MYSQL_ROOT_PASSWORD
72-
value: "password"
73-
- name: TZ
74-
value: "America/New_York"
75-
- name: MYSQL_DATABASE
76-
value: "bookstackapp"
77-
- name: MYSQL_USER
78-
value: "bookstack"
79-
- name: MYSQL_PASSWORD
80-
value: "bookstack"
81-
image: linuxserver/mariadb
82-
imagePullPolicy: Always
83-
name: bookstack-db
84-
ports:
85-
- containerPort: 3306
86-
volumeMounts:
87-
- mountPath: /config
88-
name: bookstack-db
89-
restartPolicy: Always
90-
volumes:
91-
- name: bookstack-db
92-
persistentVolumeClaim:
93-
claimName: bookstack-db
45+
claimName: bookstack

bookstack/bookstack-pvc.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,3 @@ spec:
99
resources:
1010
requests:
1111
storage: 250Mi
12-
---
13-
apiVersion: v1
14-
kind: PersistentVolumeClaim
15-
metadata:
16-
name: bookstack-db
17-
spec:
18-
storageClassName: "default"
19-
accessModes:
20-
- ReadWriteOnce
21-
resources:
22-
requests:
23-
storage: 250Mi

bookstack/bookstack-service.yaml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,4 @@ spec:
1010
port: 80
1111
targetPort: 80
1212
selector:
13-
app: bookstack
14-
---
15-
apiVersion: v1
16-
kind: Service
17-
metadata:
18-
labels:
19-
app: bookstack-db
20-
name: bookstack-db
21-
spec:
22-
ports:
23-
- name: "3306"
24-
port: 3306
25-
targetPort: 3306
26-
selector:
27-
app: bookstack-db
13+
app: bookstack

mariadb/mariadb-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ spec:
2222
ports:
2323
- containerPort: 3306
2424
env:
25+
- name: MYSQL_DATABASE
26+
value: "mariadb"
2527
- name: MYSQL_ROOT_PASSWORD
2628
value: "password"
29+
- name: MYSQL_USER
30+
value: "mariadb"
31+
- name: MYSQL_PASSWORD
32+
value: "mariadb"
2733
volumeMounts:
2834
- mountPath: /var/lib/mysql
2935
name: mariadb

mariadb/mariadb-pvc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ spec:
88
- ReadWriteOnce
99
resources:
1010
requests:
11-
storage: 250Mi
11+
storage: 5Gi

mariadb/mariadb-service.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ spec:
88
ports:
99
- name: "3306"
1010
port: 3306
11+
nodePort: 32306
1112
targetPort: 3306
1213
selector:
13-
app: mariadb
14+
app: mariadb
15+
type: NodePort

mongo/mongo-deployment.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ spec:
1919
containers:
2020
- args:
2121
- mongod
22-
- --oplogSize
23-
- "128"
2422
image: mongo:latest
2523
imagePullPolicy: Always
2624
name: mongo

nfs-provisioner/nfs-provisioner-answers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ persistence:
1313
enabled: false
1414
size: "20Gi"
1515
storageClass: ""
16-
hostPath: "/srv/persistent-volumes"
16+
hostPath: "/srv/volumes"
1717
service:
1818
type: "ClusterIP"
1919
nfsNodePort: ""

phpservermon/psm-deployment.yaml

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ spec:
1919
- name: PSM_BASE_URL
2020
value: http://phpservermon.lan/
2121
- name: PSM_DB_HOST
22-
value: phpservermon-db
22+
value: mariadb
2323
- name: PSM_DB_NAME
2424
value: phpservermon
2525
- name: PSM_DB_USER
26-
value: phpservermon
26+
value: root
2727
- name: PSM_DB_PASS
2828
value: password
2929
- name: PSM_DB_PREFIX
@@ -35,46 +35,4 @@ spec:
3535
name: phpservermon-app
3636
ports:
3737
- containerPort: 80
38-
restartPolicy: Always
39-
---
40-
apiVersion: apps/v1
41-
kind: Deployment
42-
metadata:
43-
labels:
44-
app: phpservermon-db
45-
name: phpservermon-db
46-
spec:
47-
replicas: 1
48-
selector:
49-
matchLabels:
50-
app: phpservermon-db
51-
strategy:
52-
type: Recreate
53-
template:
54-
metadata:
55-
labels:
56-
app: phpservermon-db
57-
spec:
58-
containers:
59-
- env:
60-
- name: MYSQL_ROOT_PASSWORD
61-
value: password
62-
- name: MYSQL_DATABASE
63-
value: phpservermon
64-
- name: MYSQL_USER
65-
value: phpservermon
66-
- name: MYSQL_PASSWORD
67-
value: password
68-
image: mariadb:10
69-
imagePullPolicy: Always
70-
name: phpservermon-db
71-
ports:
72-
- containerPort: 3306
73-
volumeMounts:
74-
- mountPath: /var/lib/mysql
75-
name: phpservermon-db
76-
restartPolicy: Always
77-
volumes:
78-
- name: phpservermon-db
79-
persistentVolumeClaim:
80-
claimName: phpservermon-db
38+
restartPolicy: Always

phpservermon/psm-pvc.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)