initial commit

This commit is contained in:
2024-11-04 01:22:29 +01:00
commit 23c38fe67b
44 changed files with 1307 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
db.createCollection("users")
db.createCollection("groups")
db.users.insert({
"_id" : "979888c6-656f-4af7-b7a4-97a02a3cc13d",
"namespace" : "parcoursmob",
"authentication" : {
"local" : {
"username" : "admin@parcoursmob.fr",
"password" : "$2a$10$XVq9C9az1O0w.kCzqcMZtOAMxur1ODRT5vF9/GmILyHc1Xjalzymu",
"email" : "",
"email_validation" : {
"validated" : false,
"validation_code" : ""
},
"phone_number" : "",
"phone_number_validation" : {
"validated" : false,
"validation_code" : ""
}
}
},
"data" : {
"first_name" : "Admin",
"last_name" : "Parcoursmob",
"phone_number" : "+33600000000",
"email" : "noreply@parcoursmob.fr",
"groups" : [
"483280d0-db2d-4f06-b361-02e4be5012d2",
"483280d0-db2d-4f06-b361-02e4be5012d2:admin",
],
"display_name" : "Admin Parcoursmob"
},
"metadata" : {
"created" : ISODate("2022-08-09T10:14:51.879+0000")
}
})
db.groups.insert({
"_id" : "483280d0-db2d-4f06-b361-02e4be5012d2",
"namespace" : "parcoursmob_organizations",
"members" : [],
"data" : {
"modules" : {
"groups_management" : true,
"vehicles_management" : true,
"directory" : true,
"administration" : true,
"agenda" : true,
"vehicles" : true,
"support" : true,
"beneficiaries" : true,
"journeys" : true
},
"name" : "COOPGO"
}
})

View File

@@ -0,0 +1,10 @@
resources:
- pcv.yaml
- service.yaml
- statefulset.yaml
configMapGenerator:
- name: create-db-configmap
files:
- create_db.js

View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mongodb
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: mongodb
spec:
clusterIP: None
selector:
app: mongodb
ports:
- port: 27017
targetPort: 27017

View File

@@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mongodb
spec:
serviceName: mongodb
replicas: 1
selector:
matchLabels:
app: mongodb
template:
metadata:
labels:
app: mongodb
spec:
containers:
- name: mongodb
image: mongo:latest
ports:
- containerPort: 27017
volumeMounts:
- name: mongodb-data
mountPath: /data/db
- name: "init-database"
mountPath: "/docker-entrypoint-initdb.d/"
env:
- name: MONGO_INITDB_DATABASE
value: coopgo_platform
volumes:
- name: "init-database"
configMap:
name: create-db-configmap
volumeClaimTemplates:
- metadata:
name: mongodb-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi