MongoDB Init DB import logic added

This commit is contained in:
Rishab
2023-11-02 02:28:00 +00:00
parent 4ff36d7c4b
commit f3a1a0efa9
10 changed files with 1198 additions and 3 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ appName=open_sign_server
# A 12 character long random secret key that allows access to all the data. It is used in Parse dashboard config to view all the data in the database.
MASTER_KEY=XnAadwKxxByMr
# Mongodb URI to connect to
MONGODB_URI=mongodb://host.docker.internal:27017
MONGODB_URI=mongodb://host.docker.internal:27017/OpenSignDB
# Path on which APIs should be mounted. Do not change this. This variable shall be removed & value hardcoded in the source code in coming versions.
PARSE_MOUNT=/app
# Set it to the URL from where APIs will be accessible to the NodeJS functions, for local development it should be localhost:3000/api/app (use your local port number instead)
+11
View File
@@ -0,0 +1,11 @@
# Use the official MongoDB imagee
FROM mongo:latest
# Create a directory to host initialization scripts
RUN mkdir -p /docker-entrypoint-initdb.d
# Copy default data JSON files to the initialization directory
COPY ./default-data/*.json /docker-entrypoint-initdb.d/
# Execute the initialization script during container startup
CMD ["mongod"]
@@ -0,0 +1,70 @@
[{
"_id": "lpm8ijrwod",
"name": "contracts_Admin",
"_wperm": [
"*"
],
"_rperm": [
"*"
],
"_acl": {
"*": {
"r": true,
"w": true
}
},
"_created_at": {
"$date": "2023-09-19T09:25:20.205Z"
},
"_updated_at": {
"$date": "2023-09-28T09:47:03.968Z"
}
},
{
"_id": "Bz90QJSYMw",
"name": "contracts_Guest",
"_wperm": [
"ZhOmhqvw7S"
],
"_rperm": [
"*",
"ZhOmhqvw7S"
],
"_acl": {
"ZhOmhqvw7S": {
"w": true,
"r": true
},
"*": {
"r": true
}
},
"_created_at": {
"$date": "2023-10-20T07:56:10.094Z"
},
"_updated_at": {
"$date": "2023-10-20T10:50:36.229Z"
}
},
{
"_id": "Tb14x04JK2",
"name": "contracts_User",
"_wperm": [
"*"
],
"_rperm": [
"*"
],
"_acl": {
"*": {
"r": true,
"w": true
}
},
"_created_at": {
"$date": "2023-09-19T09:25:20.205Z"
},
"_updated_at": {
"$date": "2023-10-20T06:54:09.836Z"
}
}]
@@ -0,0 +1,657 @@
[{
"_id": "_Role",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"name": "string",
"users": "relation<_User>",
"roles": "relation<_Role>",
"_metadata": {
"indexes": {
"name_1": {
"name": 1
},
"_id_": {
"_id": 1
}
},
"class_permissions": {
"get": {
"*": true
},
"find": {
"*": true
},
"count": {
"*": true
},
"create": {
"*": true
},
"update": {
"*": true
},
"delete": {
"*": true
},
"addField": {},
"protectedFields": {
"*": []
}
}
}
},
{
"_id": "_Session",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"user": "*_User",
"installationId": "string",
"sessionToken": "string",
"expiresAt": "date",
"createdWith": "object",
"_metadata": {
"indexes": {
"_id_": {
"_id": 1
}
}
}
},
{
"_id": "_User",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"username": "string",
"email": "string",
"emailVerified": "boolean",
"authData": "object",
"_metadata": {
"indexes": {
"phone_1": {
"phone": 1
},
"username_1": {
"username": 1
},
"case_insensitive_username": {
"username": 1
},
"email_1": {
"email": 1
},
"case_insensitive_email": {
"email": 1
},
"_id_": {
"_id": 1
}
},
"class_permissions": {
"get": {
"*": true
},
"find": {
"*": true
},
"count": {
"*": true
},
"create": {
"*": true
},
"update": {
"*": true
},
"delete": {
"*": true
},
"addField": {},
"protectedFields": {
"*": [
"email"
]
}
}
},
"name": "string",
"phone": "string",
"ProfilePic": "string"
},
{
"_id": "contracts_Contactbook",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"Phone": "string",
"Email": "string",
"Name": "string",
"UserRole": "string",
"UserId": "*_User",
"CreatedBy": "*_User",
"_metadata": {
"indexes": {
"_id_": {
"_id": 1
}
}
},
"TenantId": "*partners_Tenant",
"TourStatus": "array"
},
{
"_id": "contracts_Document",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"_metadata": {
"fields_options": {
"EnablePhoneOTP": {
"required": "false"
},
"IsCompleted": {
"required": "false",
"defaultValue": false
},
"IsDeclined": {
"required": "false",
"defaultValue": false
},
"SendinOrder": {
"required": "false",
"defaultValue": false
},
"ExpiryDate": {
"required": "false"
},
"Signers": {
"required": "false"
},
"Name": {
"required": "false"
},
"AgreementValidUntil": {
"required": "false"
},
"URL": {
"required": "false"
},
"RemindOnceInEvery": {
"required": "false",
"defaultValue": 5
},
"EnableEmailOTP": {
"required": "false"
},
"AutomaticReminders": {
"required": "false",
"defaultValue": false
},
"SentToOthers": {
"required": "false",
"defaultValue": false
},
"TimeToCompleteDays": {
"required": "false",
"defaultValue": 15
},
"Recipients": {
"required": "false"
},
"Type": {
"required": "false"
},
"Description": {
"required": "false"
},
"ExtUserPtr": {
"required": "false"
},
"SignedUrl": {
"required": "false"
},
"AuditTrail": {
"required": "false"
},
"Placeholders": {
"required": "false"
},
"Folder": {
"required": "false"
},
"Note": {
"required": false
},
"Clauses": {
"required": false
},
"AgreementDelta": {
"required": false
}
},
"indexes": {
"_id_": {
"_id": 1
}
},
"class_permissions": {
"get": {
"*": true
},
"find": {
"*": true
},
"count": {
"*": true
},
"create": {
"*": true
},
"update": {
"*": true
},
"delete": {
"*": true
},
"addField": {},
"protectedFields": {
"*": []
}
}
},
"EnablePhoneOTP": "boolean",
"IsCompleted": "boolean",
"IsDeclined": "boolean",
"SendinOrder": "boolean",
"ExpiryDate": "date",
"Signers": "array",
"Name": "string",
"AgreementValidUntil": "date",
"URL": "string",
"RemindOnceInEvery": "number",
"EnableEmailOTP": "boolean",
"AutomaticReminders": "boolean",
"SentToOthers": "boolean",
"TimeToCompleteDays": "number",
"Recipients": "array",
"Type": "string",
"Description": "string",
"ExtUserPtr": "*contracts_Users",
"SignedUrl": "string",
"AuditTrail": "array",
"Placeholders": "array",
"Folder": "*contracts_Document",
"Note": "string",
"CreatedBy": "*_User",
"Clauses": "array",
"AgreementDelta": "array"
},
{
"_id": "contracts_Signature",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"_metadata": {
"fields_options": {
"SignatureName": {
"required": "false"
},
"SignText": {
"required": "false"
},
"ImageURL": {
"required": "false"
},
"SignTextFont": {
"required": "false"
},
"InitialsText": {
"required": "false"
},
"InitialsFont": {
"required": "false"
},
"UserId": {
"required": false
}
},
"indexes": {
"_id_": {
"_id": 1
}
},
"class_permissions": {
"get": {
"*": true
},
"find": {
"*": true
},
"count": {
"*": true
},
"create": {
"*": true
},
"update": {
"*": true
},
"delete": {
"*": true
},
"addField": {},
"protectedFields": {
"*": []
}
}
},
"SignatureName": "string",
"SignText": "string",
"ImageURL": "string",
"SignTextFont": "string",
"InitialsText": "string",
"InitialsFont": "string",
"Initials": "string",
"UserId": "*_User"
},
{
"_id": "contracts_Users",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"_metadata": {
"fields_options": {
"Name": {
"required": "false"
},
"Phone": {
"required": "false"
},
"JobTitle": {
"required": "false"
},
"Email": {
"required": "false"
},
"Company": {
"required": "false"
},
"UserId": {
"required": "false"
},
"TenantId": {
"required": "false"
},
"TourStatus": {
"required": false
},
"IsContactEntry": {
"required": false,
"defaultValue": false
},
"ShareWithTeam": {
"required": false
}
},
"indexes": {
"_id_": {
"_id": 1
}
},
"class_permissions": {
"get": {
"*": true
},
"find": {
"*": true
},
"count": {
"*": true
},
"create": {
"*": true
},
"update": {
"*": true
},
"delete": {
"*": true
},
"addField": {},
"protectedFields": {
"*": []
}
}
},
"Name": "string",
"Phone": "string",
"JobTitle": "string",
"Email": "string",
"Company": "string",
"UserId": "*_User",
"TenantId": "*partners_Tenant",
"TourStatus": "array",
"Plan": "object",
"UserRole": "string",
"Next_billing_date": "date",
"Customer_id": "string",
"Subscription_id": "string",
"CreatedBy": "*_User",
"IsContactEntry": "boolean",
"ShareWithTeam": "boolean"
},
{
"_id": "partners_DataFiles",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"FileSize": "number",
"FileUrl": "string",
"_metadata": {
"indexes": {
"_id_": {
"_id": 1
}
}
}
},
{
"_id": "partners_Subscriptions",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date"
},
{
"_id": "partners_Tenant",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"EmailAddress": "string",
"TenantName": "string",
"IsActive": "boolean",
"CreatedBy": "*_User",
"ContactNumber": "string",
"UserId": "*_User",
"_metadata": {
"indexes": {
"_id_": {
"_id": 1
}
}
}
},
{
"_id": "partners_TenantCredits",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"usedStorage": "number",
"PartnersTenant": "*partners_Tenant",
"_metadata": {
"indexes": {
"_id_": {
"_id": 1
}
}
}
},
{
"_id": "w_appinfo",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"orgId": "string",
"forgetpassFormId": "string",
"mainformObjId": "string",
"applogo": "string",
"fbAppId": "string",
"appname": "string",
"loginFormId": "string",
"baseurl": "string",
"org_name": "string",
"signUpFormId": "string",
"defaultmenuid": "string",
"version": "string",
"formTitle": "string",
"googleClietId": "string",
"_metadata": {
"indexes": {
"_id_": {
"_id": 1
}
},
"class_permissions": {
"get": {
"*": true
},
"find": {
"*": true
},
"count": {
"*": true
},
"create": {
"*": true
},
"update": {
"*": true
},
"delete": {
"*": true
},
"addField": {
"*": true
}
},
"fields_options": {
"uploadUrl": {
"required": false
}
}
},
"class": "string",
"LandingPageId": "string",
"accessType": "string",
"settings": "array",
"appTitle": "string",
"metaDescription": "string",
"branding_image": "string",
"fev_Icon": "string",
"defaultRole": "string",
"results": "array",
"loginType": "string",
"createdBy": "*_User",
"domain": "string",
"enableWebNotification": "boolean",
"allowWhiteLabel": "boolean",
"uploadUrl": "string"
},
{
"_id": "w_dashboard",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"dbDescription": "string",
"dbTitle": "string",
"bgColor": "string",
"rows": "array",
"_metadata": {
"indexes": {
"_id_": {
"_id": 1
}
}
},
"appId": "*w_appinfo"
},
{
"_id": "w_formV3",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"description": "string",
"uiSchema": "object",
"jsonSchema": "object",
"_metadata": {
"indexes": {
"_id_": {
"_id": 1
}
}
},
"class": "string",
"success_message": "string",
"restrict_form_entry": "object",
"send_email": "boolean",
"restrict_form_access": "object",
"email_template": "object",
"form_permission": "string",
"success_redirect": "string",
"form_buttons": "object",
"buttons": "object",
"appId": "*w_appinfo",
"rpTitle": "string",
"rpDescription": "string",
"rpType": "string",
"bgColor": "string",
"rows": "array",
"redirect_id": "string",
"formACL": "object",
"userSchema": "object",
"isRegisterForm": "boolean",
"liveValidate": "boolean",
"noValidate": "boolean",
"validFunction": "string",
"help": "object",
"name": "string",
"phone": "string",
"email": "string",
"password": "string",
"username": "string",
"role": "string",
"helpText": "object",
"helpTextForm": "object",
"hideActionsAfter": "number",
"rules": "array",
"extraActions": "object",
"persistentFields": "array"
},
{
"_id": "w_menu",
"objectId": "string",
"updatedAt": "date",
"createdAt": "date",
"menuTitle": "string",
"menuType": "string",
"menuItems": "array",
"_metadata": {
"indexes": {
"_id_": {
"_id": 1
}
}
},
"appId": "*w_appinfo"
}]
File diff suppressed because one or more lines are too long
@@ -0,0 +1,104 @@
[{
"_id": "35KBoSgoAK",
"rows": [
{
"columns": [
{
"colxs": "12",
"colmd": "6",
"collg": "6",
"widget": {
"type": "Card",
"icon": "fas fa-signature",
"bgColor": "#f0058e",
"label": "Need your Signature",
"description": null,
"data": {
"id": "e04ee9dc-932d-6b80-0202-703fd154eb74",
"queryType": "",
"class": "contracts_Document",
"query": "where={\"$and\":[{\"AuditTrail.UserPtr\":{\"$ne\":{\"__type\":\"Pointer\",\"className\": \"contracts_Users\",\"objectId\":\"#objectId#\"}}},{\"AuditTrail.Activity\":{\"$ne\":\"Signed\"}}],\"Signers\":{\"$in\":[{\"__type\":\"Pointer\",\"className\":\"contracts_Users\",\"objectId\":\"#objectId#\"}]},\"IsDeclined\":{\"$ne\":true},\"IsCompleted\":{\"$ne\":true},\"Type\":{\"$ne\":\"Folder\"},\"Placeholders\":{\"$ne\":null},\"ExpiryDate\":{\"#*gt\":{\"__type\":\"#Date#\",\"iso\":\"#today#\"}}}&count=1",
"key": "count",
"Redirect_type": "Report",
"Redirect_id": "4Hhwbp482K",
"tourSection": "tourcard1",
"tourMessage": "This card shows the aggregate count of documents that are awaiting your signature. Clicking on this card will seamlessly take you to the detailed list of such documents for your review and action."
}
}
},
{
"colxs": "12",
"colmd": "6",
"collg": "6",
"widget": {
"type": "Card",
"icon": "fas fa-sign-out-alt",
"bgColor": "#g0058e",
"label": "Out for signatures",
"description": null,
"data": {
"id": "c1935cc0-28d4-3d73-b72a-8c1e3d18a17f",
"queryType": "",
"class": "contracts_Document",
"query": "where={\"CreatedBy\":{\"__type\":\"Pointer\",\"className\":\"_User\",\"objectId\":\"#UserId.objectId#\"},\"IsCompleted\":{\"$ne\":true},\"IsDeclined\":{\"$ne\":true},\"Type\":{\"$ne\":\"Folder\"},\"Placeholders\":{\"$ne\":null},\"ExpiryDate\":{\"#*gt\":{\"__type\":\"#Date#\",\"iso\":\"#today#\"}}}&count=1",
"key": "count",
"Redirect_type": "Report",
"Redirect_id": "1MwEuxLEkF",
"tourSection": "tourcard2",
"tourMessage": "This card indicates the total number of documents you've sent out for signatures. A single click on this card will navigate you to a comprehensive list of these documents, allowing you to monitor their status."
}
}
},
{
"colxs": "12",
"colmd": "6",
"collg": "6",
"widget": {
"type": "report",
"reportId": "5Go51Q7T8r",
"data": {
"tourSection": "tourreport1",
"tourMessage": "Here lies a curated list of documents that are pending your signature. These are requests from other users that require your immediate attention for completion."
}
}
},
{
"colxs": "12",
"colmd": "6",
"collg": "6",
"widget": {
"type": "report",
"reportId": "d9k3UfYHBc",
"data": {
"tourSection": "tourreport2",
"tourMessage": "This area displays all the documents you've dispatched for signatures from other parties. It serves as a real-time tracker for documents pending external approval."
}
}
},
{
"colxs": "12",
"colmd": "12",
"collg": "12",
"widget": {
"type": "report",
"reportId": "kC5mfynCi4",
"data": {
"tourSection": "tourreport3",
"tourMessage": "In this section, you'll find your draft documents awaiting completion. These are the documents you've initiated but haven't yet finalized for sending."
}
}
}
]
}
],
"_p_appId": "w_appinfo$aIPmIvMzGM",
"dbTitle": "Dashboard",
"dbDescription": null,
"bgColor": "#ffffff",
"_created_at": {
"$date": "2023-09-04T13:17:26.707Z"
},
"_updated_at": {
"$date": "2023-09-27T04:53:20.395Z"
}
}]
@@ -0,0 +1,272 @@
[{
"_id": "H9vRfEYKhT",
"_created_at": {
"$date": "2023-09-04T14:04:00.669Z"
},
"_updated_at": {
"$date": "2023-10-20T06:27:02.314Z"
},
"_p_appId": "w_appinfo$aIPmIvMzGM",
"menuItems": [
{
"icon": "fas fa-tachometer-alt",
"title": "Dashboard",
"target": "",
"pageType": "dashboard",
"description": "",
"objectId": "35KBoSgoAK"
},
{
"icon": "far fa-newspaper",
"title": "New Document",
"target": "_self",
"pageType": null,
"description": null,
"objectId": null,
"children": [
{
"icon": "fas fa-pen-nib",
"title": "Sign yourself",
"target": "_self",
"pageType": "form",
"description": "",
"objectId": "sHAnZphf69"
},
{
"icon": "fas fa-file-signature",
"title": "Request signatures",
"target": "_self",
"pageType": "form",
"description": "",
"objectId": "8mZzFxbG1z"
}
]
},
{
"icon": "fas fa-folder",
"title": "OpenSignDrive™",
"target": "_self",
"pageType": "mf",
"description": "",
"objectId": "remoteUrl=aHR0cHM6Ly9xaWstYWktb3JnLmdpdGh1Yi5pby9TaWduLU1pY3JvYXBwVjIvcmVtb3RlRW50cnkuanM=&moduleToLoad=AppRoutes&remoteName=signmicroapp/legadrive"
},
{
"icon": "fas fa-address-card",
"title": "Reports",
"target": "_self",
"pageType": null,
"description": "",
"objectId": null,
"children": [
{
"icon": "fas fa-signature",
"title": "Need your sign",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "4Hhwbp482K"
},
{
"icon": "fas fa-tasks",
"title": "In Progress",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "1MwEuxLEkF"
},
{
"icon": "fas fa-check-circle",
"title": "Completed",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "kQUoW4hUXz"
},
{
"icon": "fas fa-edit",
"title": "Drafts",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "ByHuevtCFY"
},
{
"icon": "fas fa-times-circle",
"title": "Declined",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "UPr2Fm5WY3"
},
{
"icon": "fas fa-hourglass-end",
"title": "Expired",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "zNqBHXHsYH"
}
]
},
{
"icon": "fas fa-cog",
"title": "Settings",
"target": "_self",
"pageType": null,
"description": "",
"objectId": null,
"children": [
{
"icon": "fas fa-pen-fancy",
"title": "My Signature",
"target": "_self",
"pageType": "mf",
"description": "",
"objectId": "remoteUrl=aHR0cHM6Ly9xaWstYWktb3JnLmdpdGh1Yi5pby9TaWduLU1pY3JvYXBwVjIvcmVtb3RlRW50cnkuanM=&moduleToLoad=AppRoutes&remoteName=signmicroapp/managesign"
}
]
}
],
"menuTitle": "Default Menu",
"menuType": "Side Menu"
},
{
"_id": "VPh91h0ZHk",
"_created_at": {
"$date": "2023-09-04T14:16:15.424Z"
},
"_updated_at": {
"$date": "2023-10-20T06:25:59.660Z"
},
"_p_appId": "w_appinfo$aIPmIvMzGM",
"menuItems": [
{
"icon": "fas fa-tachometer-alt",
"title": "Dashboard",
"target": "",
"pageType": "dashboard",
"description": "",
"objectId": "35KBoSgoAK"
},
{
"icon": "far fa-newspaper",
"title": "New Document",
"target": "_self",
"pageType": null,
"description": null,
"objectId": null,
"children": [
{
"icon": "fas fa-pen-nib",
"title": "Sign yourself",
"target": "_self",
"pageType": "form",
"description": "",
"objectId": "sHAnZphf69"
},
{
"icon": "fas fa-file-signature",
"title": "Request signatures",
"target": "_self",
"pageType": "form",
"description": "",
"objectId": "8mZzFxbG1z"
}
]
},
{
"icon": "fas fa-folder",
"title": "OpenSignDrive™",
"target": "_self",
"pageType": "mf",
"description": "",
"objectId": "remoteUrl=aHR0cHM6Ly9xaWstYWktb3JnLmdpdGh1Yi5pby9TaWduLU1pY3JvYXBwVjIvcmVtb3RlRW50cnkuanM=&moduleToLoad=AppRoutes&remoteName=signmicroapp/legadrive"
},
{
"icon": "fas fa-address-card",
"title": "Reports",
"target": "_self",
"pageType": null,
"description": "",
"objectId": null,
"children": [
{
"icon": "fas fa-signature",
"title": "Need your sign",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "4Hhwbp482K"
},
{
"icon": "fas fa-tasks",
"title": "In Progress",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "1MwEuxLEkF"
},
{
"icon": "fas fa-check-circle",
"title": "Completed",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "kQUoW4hUXz"
},
{
"icon": "fas fa-edit",
"title": "Drafts",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "ByHuevtCFY"
},
{
"icon": "fas fa-times-circle",
"title": "Declined",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "UPr2Fm5WY3"
},
{
"icon": "fas fa-hourglass-end",
"title": "Expired",
"target": "_self",
"pageType": "report",
"description": "",
"objectId": "zNqBHXHsYH"
}
]
},
{
"icon": "fas fa-cog",
"title": "Settings",
"target": "_self",
"pageType": null,
"description": "",
"objectId": null,
"children": [
{
"icon": "fas fa-pen-fancy",
"title": "My Signature",
"target": "_self",
"pageType": "mf",
"description": "",
"objectId": "remoteUrl=aHR0cHM6Ly9xaWstYWktb3JnLmdpdGh1Yi5pby9TaWduLU1pY3JvYXBwVjIvcmVtb3RlRW50cnkuanM=&moduleToLoad=AppRoutes&remoteName=signmicroapp/managesign"
},
{
"icon": "far fa-user",
"title": "Add User",
"target": "_self",
"pageType": "form",
"description": "",
"objectId": "lM0xRnM3iE"
}
]
}
],
"menuTitle": "Admin Menu",
"menuType": "Side Menu"
}]
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
echo "Starting MongoDB initial data import..."
# Wait for MongoDB to fully start
sleep 10
# Import the data
mongoimport --host localhost --db OpenSignDB --collection _Role --type json --file /docker-entrypoint-initdb.d/legadraGCva._Role.json --jsonArray
mongoimport --host localhost --db OpenSignDB --collection _SCHEMA --type json --file /docker-entrypoint-initdb.d/legadraGCva._SCHEMA.json --jsonArray
mongoimport --host localhost --db OpenSignDB --collection w_appinfo --type json --file /docker-entrypoint-initdb.d/legadraGCva.w_appinfo.json --jsonArray
mongoimport --host localhost --db OpenSignDB --collection w_dashboard --type json --file /docker-entrypoint-initdb.d/legadraGCva.w_dashboard.json --jsonArray
mongoimport --host localhost --db OpenSignDB --collection w_menu --type json --file /docker-entrypoint-initdb.d/legadraGCva.w_menu.json --jsonArray
echo "MongoDB initial data import done."
+7 -2
View File
@@ -21,9 +21,14 @@ services:
networks:
- app-network
mongo:
image: mongo
build:
context: ./apps/mongo
dockerfile: Dockerfile
container_name: mongo-container
image: opensign-mongo
volumes:
- data-volume:/data/db
- ./apps/mongo/mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro
ports:
- "27017:27017"
networks:
@@ -53,7 +58,7 @@ services:
environment:
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- ./localstack-script.sh:/etc/localstack/init/ready.d/script.sh
- .apps/localstack/localstack-script.sh:/etc/localstack/init/ready.d/script.sh
- '/var/run/docker.sock:/var/run/docker.sock'
networks: