@tiledesk/tiledesk-server 2.3.6 → 2.3.7-1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. package/.github/workflows/docker-community-worker-push-latest.yml +23 -0
  2. package/.github/workflows/docker-image-tag-worker-community-tag-push.yml +22 -0
  3. package/CHANGELOG.md +361 -3
  4. package/Dockerfile-jobs +31 -0
  5. package/app.js +62 -69
  6. package/channels/chat21/chat21Handler.js +37 -6
  7. package/channels/chat21/chat21WebHook.js +62 -34
  8. package/channels/chat21/package-lock.json +663 -706
  9. package/channels/chat21/package.json +2 -2
  10. package/config/labels/widget.json +337 -136
  11. package/deploy.sh +2 -0
  12. package/event/messageEvent.js +110 -9
  13. package/jobs.js +80 -0
  14. package/jobsManager.js +47 -0
  15. package/middleware/has-role.js +10 -3
  16. package/middleware/ipFilter.js +220 -0
  17. package/middleware/passport.js +8 -2
  18. package/models/department.js +1 -1
  19. package/models/faq.js +77 -25
  20. package/models/faq_kb.js +19 -0
  21. package/models/message.js +10 -8
  22. package/models/project.js +10 -0
  23. package/models/project_user.js +10 -0
  24. package/models/request.js +12 -1
  25. package/package.json +12 -11
  26. package/pubmodules/activities/activityArchiver.js +216 -90
  27. package/pubmodules/activities/routes/activity.js +1 -1
  28. package/pubmodules/apps/index.js +8 -0
  29. package/pubmodules/apps/listener.js +27 -0
  30. package/pubmodules/cache/index.js +2 -0
  31. package/pubmodules/cache/mongoose-cachegoose-fn.js +630 -0
  32. package/pubmodules/canned/cannedResponse.js +4 -0
  33. package/pubmodules/canned/cannedResponseRoute.js +10 -5
  34. package/pubmodules/dialogflow/index.js +10 -0
  35. package/pubmodules/dialogflow/listener.js +66 -0
  36. package/pubmodules/emailNotification/requestNotification.js +58 -28
  37. package/pubmodules/events/eventRoute.js +49 -24
  38. package/pubmodules/messageTransformer/messageHandlebarsTransformerInterceptor.js +6 -1
  39. package/pubmodules/messageTransformer/messageTransformerInterceptor.js +10 -4
  40. package/pubmodules/pubModulesManager.js +173 -7
  41. package/pubmodules/queue/index.js +4 -0
  42. package/pubmodules/queue/reconnect.js +331 -0
  43. package/pubmodules/queue/reconnectFanout.js +256 -0
  44. package/pubmodules/rasa/listener.js +5 -5
  45. package/pubmodules/routing-queue/index.js +3 -0
  46. package/pubmodules/routing-queue/listener.js +328 -0
  47. package/pubmodules/rules/conciergeBot.js +2 -2
  48. package/pubmodules/scheduler/tasks/closeAgentUnresponsiveRequestTask.js +6 -1
  49. package/pubmodules/scheduler/tasks/closeBotUnresponsiveRequestTask.js +7 -1
  50. package/pubmodules/tilebot/index.js +11 -0
  51. package/pubmodules/tilebot/listener.js +85 -0
  52. package/pubmodules/trigger/rulesTrigger.js +137 -14
  53. package/pubmodules/trigger/start.js +5 -1
  54. package/pubmodules/whatsapp/index.js +7 -0
  55. package/pubmodules/whatsapp/listener.js +32 -0
  56. package/routes/auth.js +7 -2
  57. package/routes/campaigns.js +3 -3
  58. package/routes/department.js +3 -2
  59. package/routes/email.js +32 -2
  60. package/routes/faq.js +37 -2
  61. package/routes/faq_kb.js +496 -133
  62. package/routes/faqpub.js +5 -0
  63. package/routes/lead.js +56 -0
  64. package/routes/message.js +196 -14
  65. package/routes/messagesRoot.js +39 -0
  66. package/routes/project.js +76 -4
  67. package/routes/project_user.js +11 -1
  68. package/routes/project_user_test.js +19 -0
  69. package/routes/request.js +134 -30
  70. package/routes/troubleshooting.js +12 -0
  71. package/routes/users-util.js +39 -0
  72. package/routes/users.js +1 -1
  73. package/routes/widget.js +64 -2
  74. package/services/BotSubscriptionNotifier.js +5 -0
  75. package/services/banUserNotifier.js +86 -0
  76. package/services/cacheEnabler.js +56 -0
  77. package/services/chatbotService.js +101 -0
  78. package/services/departmentService.js +25 -3
  79. package/services/emailService.js +170 -28
  80. package/services/faqBotHandler.js +2 -3
  81. package/services/faqService.js +28 -3
  82. package/services/geoService.js +36 -6
  83. package/services/labelService.js +1 -1
  84. package/services/leadService.js +3 -2
  85. package/services/messageService.js +4 -2
  86. package/services/modulesManager.js +23 -76
  87. package/services/operatingHoursService.js +9 -4
  88. package/services/requestService.js +75 -39
  89. package/services/subscriptionNotifier.js +9 -4
  90. package/services/trainingService.js +106 -0
  91. package/template/email/assignedEmailMessage.html +21 -11
  92. package/template/email/assignedRequest.html +21 -11
  93. package/template/email/beenInvitedExistingUser.html +16 -6
  94. package/template/email/beenInvitedNewUser.html +16 -6
  95. package/template/email/emailDirect.html +130 -0
  96. package/template/email/newMessage.html +18 -8
  97. package/template/email/newMessageFollower.html +22 -12
  98. package/template/email/passwordChanged.html +15 -5
  99. package/template/email/pooledEmailMessage.html +21 -11
  100. package/template/email/pooledRequest.html +20 -10
  101. package/template/email/resetPassword.html +15 -5
  102. package/template/email/sendTranscript.html +7 -4
  103. package/template/email/ticket.html +17 -7
  104. package/template/email/verify.html +15 -5
  105. package/test/cannedRoute.js +157 -0
  106. package/test/chatbot-mock.js +127 -0
  107. package/test/example-json-intents.txt +1 -0
  108. package/test/example-json.txt +1 -0
  109. package/test/example.json +1 -0
  110. package/test/faqRoute.js +353 -208
  111. package/test/faqkbRoute.js +669 -64
  112. package/test/imageRoute.js +1 -1
  113. package/test/messageRoute.js +387 -5
  114. package/test/requestRoute.js +6 -6
  115. package/test/requestService.js +55 -4
  116. package/test-int/cache-project.js +90 -0
  117. package/test-int/cache-project_user.js +88 -0
  118. package/utils/UIDGenerator.js +20 -0
  119. package/utils/cacheUtil.js +2 -2
  120. package/utils/orgUtil.js +3 -3
  121. package/utils/promiseUtil.js +31 -0
  122. package/utils/recipientEmailUtil.js +66 -0
  123. package/utils/sendEmailUtil.js +34 -0
  124. package/utils/sendMessageUtil.js +1 -1
  125. package/utils/stringUtil.js +12 -0
  126. package/websocket/webSocketServer.js +33 -10
@@ -0,0 +1,23 @@
1
+ name: Docker Image Community latest CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ push_to_registry:
11
+ name: Push Docker image to Docker Hub
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ name: Check out the repo
17
+ - uses: docker/build-push-action@v1
18
+ with:
19
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
20
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
21
+ repository: tiledesk/tiledesk-server-worker
22
+ dockerfile: Dockerfile-jobs
23
+ tags: latest
@@ -0,0 +1,22 @@
1
+ name: Publish Docker Community image tags
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '**' # Push events to every tag including hierarchical tags like
7
+ jobs:
8
+
9
+ push_to_registry:
10
+ name: Push Docker image to Docker Hub
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Check out the repo
14
+ uses: actions/checkout@v2
15
+ - name: Push to Docker Hub
16
+ uses: docker/build-push-action@v1
17
+ with:
18
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
19
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
20
+ dockerfile: Dockerfile-jobs
21
+ repository: tiledesk/tiledesk-server-worker
22
+ tag_with_ref: true
package/CHANGELOG.md CHANGED
@@ -1,15 +1,373 @@
1
1
 
2
2
 
3
+ 💥 TILEDESK SERVER v2.3.71 💥
4
+ 🚀 TAGGED AND PUBLISHED ON NPM 🚀
5
+ 🚀 IN PRODUCTION 🚀
6
+ (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.71)
7
+
8
+ # 2.3.71
9
+ - Email service send email direct fit without request_id
10
+ - Removed strong from transcript email template
11
+ - Added for updateWaitingTimeByRequestId the field enable_populate
12
+ - Added cache for message send endpoint
13
+ - Added support to mention and group to mail endpoint
14
+ - Now user role can use /users/search (for smtp)
15
+ - Disable text validation for send message
16
+ - Logo email fix
17
+
18
+ # 2.3.70
19
+ - Update tiledesk-tybot-connector to 0.1.42
20
+
21
+ # 2.3.69
22
+ - Update tiledesk-dialogflow-connector to 1.8.3
23
+
24
+ # 2.3.68
25
+ - Update tiledesk-dialogflow-connector to 1.8.2
26
+
27
+ # 2.3.67
28
+ - Tybot updated to 0.1.39
29
+
30
+ # 2.3.66
31
+ - ccEnabled fix
32
+
33
+ # 2.3.65
34
+ - Updated tiledesk-tybot-connector 0.1.38
35
+ - chatbot and subscription can use send email endpoint
36
+ - Added EMAIL_CC_ENABLED env variable to disable CCs email inboud notification
37
+
38
+ # 2.3.64
39
+ - log fix
40
+ - Tybot updated to 0.1.37
41
+
42
+ # 2.3.63
43
+ - Tybot updated to 0.1.36
44
+ - ChangeLog degli ultimi due commit:
45
+ - added trainingService.js file
46
+ - added certified, mainCategory and intentsEngine fields for faq_kb model
47
+ - deleted new_bot_name for forked chatbot
48
+ - updated faq and faq_kb tests
49
+ - edit trainingService.js
50
+ - add test for bot with intentsEngine (training)
51
+
52
+
53
+ # 2.3.62
54
+ - if (request.markModified) fix webhook in queue
55
+
56
+ # 2.3.61
57
+ - troubleshooting api added
58
+
59
+ # 2.3.60
60
+ - Tybot updated to 0.1.34
61
+
62
+ # 2.3.59
63
+ - Tybot updated to 0.1.32
64
+
65
+ # 2.3.58
66
+ - Tybot updated to 0.1.31
67
+
68
+ # 2.3.57
69
+ - Tybot updated to 0.1.30
70
+
71
+ # 2.3.55
72
+ - Tybot updated to 0.1.28
73
+
74
+ # 2.3.54
75
+ - Added HIDE_CLOSE_REQUEST_ERRORS env variable
76
+ - Added email.send trigger action
77
+ - Added participants parameter for trigger action
78
+ - Added status -1 for department model to hide department for dashboard and widget. It can be used for chatbot
79
+ - Added template engine to send email trigger action
80
+
81
+ # 2.3.51
82
+ - Added message.received as trigger event
83
+ - Added import chatbot
84
+ - Fix lead.fullname.email.update event
85
+
86
+ # 2.3.50
87
+ - Added new email sending endpoint
88
+ - Emails endpoint is now usable by agents
89
+ - Added route for tiledesk-apps
90
+ - Added route for tiledesk-whatsapp
91
+ - Added route for tiledesk-kaleyra
92
+ - Updated widget.json file
93
+ - Fixed template for: beenInvitedNewUser.html beenInvitedExistingUser.html
94
+
95
+ # 2.3.49
96
+ - @tiledesk/tiledesk-tybot-connector": "^0.1.22
97
+
98
+ # 2.3.48
99
+ - added populate_request to root message endpoint for descending
100
+
101
+ # 2.3.47
102
+ - added root message endpoint for descending
103
+
104
+ # 2.3.46
105
+ - @tiledesk/tiledesk-tybot-connector": "^0.1.21
106
+
107
+ # 2.3.45
108
+ - process.env.GLOBAL_SECRET fix
109
+
110
+ # 2.3.44
111
+ - Removed unused "sinon": "^9.2.4",
112
+ - Removed unused "sinon-mongoose": "^2.3.0"
113
+ - Update @tiledesk/tiledesk-tybot-connector: 0.1.19
114
+
115
+
116
+ # 2.3.43
117
+ - Package-lock fix
118
+ - @tiledesk/tiledesk-tybot-connector: 0.1.17
119
+
120
+
121
+ # 2.3.42
122
+ - Labels update
123
+
124
+ # 2.3.41
125
+ - Added force parameter to close request
126
+ - Updated dependency tiledesk/tiledesk-tybot-connector": 0.1.16
127
+
128
+ # 2.3.40
129
+ - logfix
130
+
131
+ # 2.3.39
132
+ - logfix
133
+
134
+ # 2.3.38
135
+ - JobManager require fix
136
+
137
+ # 2.3.37
138
+ - Created a job worker for geo db, activities and email notification
139
+ - users_util lookup fix
140
+
141
+ # 2.3.36
142
+ - BugFix email secure with false value. https://tiledesk.discourse.group/t/error-sending-email/180
143
+
144
+ # 2.3.35
145
+ - Added user util endpoint for contact lookup from chat21
146
+
147
+ # 2.3.34
148
+ - aqmp depenency fix
149
+
150
+ # 2.3.32
151
+ - log pub module queue
152
+
153
+ # 2.3.31
154
+ - logfix
155
+
156
+ # 2.3.30
157
+ - save multiple messages fix with sequential promises
158
+ - Default JSON_BODY_LIMIT increased to 500KB. Added JSON_BODY_LIMIT env variable
159
+
160
+ # 2.3.29
161
+ - UIDGenerator class replacement for request route
162
+ - Added hasRole cache for project_user
163
+ - Added index { id_project: 1, role: 1, status: 1, createdAt: 1 } for Project_user schema
164
+ - Enabled project_user for cacheEnabler class
165
+ - Created cache test for project_user and project
166
+ - Enabled project_user cache for hasRole method
167
+ - Log fix
168
+ - add fields reply and enabled to faq model
169
+ - field answer in faq model is no longer required
170
+ - add field public to faq_kb model
171
+ - when template is undefined the empty template is now created
172
+ - Add unit test for project and project_user
173
+ - Created new endpoint for creating new requests with unit test
174
+ - Created new endpoint for inserting multiple messages at once with unit test
175
+ - New validation for empty text for new message endpoint
176
+ - Added project_user_test route
177
+ - Unit test fix
178
+
179
+ # 2.3.28
180
+ - UIDGenerator renamed fix
181
+
182
+ # 2.3.27
183
+ - CacheUtil fix with new values
184
+ - UIDGenerator class replacement
185
+ - Disabled cache for requestService route. Bug: No matching document found for id "XYZ"
186
+
187
+ # 2.3.26
188
+ - DialogFlow connector fix /tdbot
189
+
190
+ # 2.3.25
191
+ - Emebedded DialogFlow connector to 1.7.4
192
+
193
+ # 2.3.24
194
+ - Increased cache TTL from: standardTTL from 120 to 300, longTTL from 1200 to 3600
195
+ - Added cache request.create.simple + cacheEnabler. name fix
196
+ - Disabled unapplicable cache for updateWaitingTimeByRequestId and find request by id REST API
197
+ - Updated dependency @tiledesk/tiledesk-tybot-connector to 0.1.14
198
+ - Restored populateMessageWithRequest. Bug with \agent command. Try to resolve performance with cache
199
+ - Added cache for chat21 webhook event type message. The cache key is without the project id
200
+ - Disabled cache for chat21 webhook conversation archived method
201
+ - Added cache for message event lookup
202
+ - Added cache for chat21 webhook event type message
203
+ - Added cache for getoperator method of department service
204
+
205
+
206
+ # 2.3.23
207
+ - cacheEnabler + trigger cache + subscription cache
208
+ - project cache with cacheEnabler
209
+ - request cache with cacheEnabler
210
+ - Updated dependency @tiledesk/tiledesk-tybot-connector to 0.1.10
211
+ - Added trigger and subscription cache invalidation rules
212
+
213
+ # 2.3.22
214
+ - added cacheoose dep package.json
215
+ - Updated dependency @tiledesk/tiledesk-tybot-connector to 0.1.8
216
+
217
+ # 2.3.21
218
+ - log fix
219
+ - Updated dependency @tiledesk/tiledesk-tybot-connector to 0.1.7
220
+ - Moved cache module to public module
221
+ - filter request by smartAssignment
222
+
223
+ # 2.3.20
224
+ - Performance: Removed populate for message.update messages. This event is not used by anyone.
225
+
226
+ # 2.3.19
227
+ - Moved queue module to public module
228
+ - Moved route-queue to public module
229
+ - Disable queue module if JOB_WORKER_ENABLED is true
230
+
231
+ # 2.3.18.7
232
+ - filter request by smartAssignment
233
+
234
+ # 2.3.18.6
235
+ - logfix
236
+
237
+ # 2.3.18.1
238
+ - Updated dependency @tiledesk/tiledesk-tybot-connector to 0.1.10
239
+
240
+ # 2.3.18
241
+ - Added profileStatus field to the project_user model
242
+ - Added smartAssignment field to the request model
243
+ - Canned responses default limit value increased from 40 to 1000
244
+ - Now you change channel name from REST endpoint
245
+ - New Tybot 0.1.5
246
+ - GeoService setImmediate added
247
+ - Websocket setImmediate and topic validation
248
+ - Do not trigger requestNotification send email method for preflight request
249
+ - Removed deprecated .count with .countDocument
250
+ - Added workingStatus to request model
251
+ - Changed Anonymous signin from Guest to guest#shortuid
252
+ - Updated chat21/chat21-node-sdk to 1.1.7. Now group parameter is supported.
253
+ - Moved queue module to public modules folder
254
+ - Created JobManager and Job runner files
255
+ - Now activity archiver module uses queue engine
256
+ - Now geoService uses queue engine
257
+ - Added GEO_SERVICE_ENABLED to enable disable ip lookup to latitude and longitude
258
+ - Added EMAIL_NOTIFICATION_ENABLED to enable disable email notification
259
+
260
+
261
+ # 2.3.17
262
+ - Webhook chat21 fix
263
+ - Chat21 Cloud Function: when an agent leaves a conversation an info message is sent to notify it to the visitor
264
+
265
+ # 2.3.16
266
+ - Request close activity added as event. Now you can see from the Activity menu who has closed the conversation and when.
267
+ - Log fix for webhook chat21
268
+
269
+ # 2.3.15
270
+ - BugFix: Endpoint Widget fix for undefined of the project.widget object
271
+
272
+ # 2.3.14
273
+ - Added ip filter with Deny roles and ban User roles
274
+ - Ban notifier module
275
+ - Created a new Middleware decodeJwt before passport with passport fallback
276
+ - Removed unused requestService.incrementMessagesCountByRequestId code from chat21Webhook
277
+ - Allow agents to manage groups endpoint
278
+ - Embedded the new Tilebot chat server
279
+
280
+ # 2.3.13
281
+ - Getting ip fix
282
+
283
+ # 2.3.10
284
+ - Added tilebot submodule
285
+ - Askbot endpoint fix for tilebot and auto create faqs for tilebot
286
+ - Added /widgets/ip endpoint
287
+ - Added bot and subscription as permission check for /intents or /faq
288
+
289
+ # 2.3.9
290
+ - Rasa process env variable read fix
291
+
292
+ # 2.3.8
293
+ - @tiledesk/tiledesk-rasa-connector": "^1.0.10
294
+
295
+ # 2.3.7
296
+ - Find by intent_display_name parameter intents
297
+
298
+ # 2.3.5
299
+ - CHAT_REOPENED updated conversation true
300
+
301
+ # 2.3.4
302
+ - download pdf fix
303
+ - added no_count and no_textscore fields query parameters to request search endpoint
304
+
305
+ # 2.3.3
306
+ - Follower notification fix by email
307
+
3
308
  # 2.3.2
4
309
  - Dowload trascript as csv, pdf and txt endpoint
5
310
  - Added closed_by field to the request model
6
- - Added followers field to the request model
311
+ - Added followers field to the request model
7
312
  - Added lead index
8
- - Added widget v5 code loader /widgets/v5/:project_id -> heroku blocca cache-control
313
+ - Added widget v5 code loader /widgets/v5/:project_id -> heroku blocca cache-control PROVA IN PROD
9
314
  - Bugfix Cannot read property 'profile' of null
10
315
  - Added filter by channel offline and online
11
- - Updated Rasa Connector to 1.0.7
316
+ - Updated Rasa Connector to 1.0.7 -- QUANDO PORTI IN PROD AGGIORNA SUL DB PER FARLI PUNTARE QUI..
12
317
  - Send info message on lead.fullaname.update
318
+ - Follower email notification
319
+
320
+ https://support.zendesk.com/hc/en-us/articles/4408822451482-Using-CCs-followers-and-mentions#topic_wm2_zgq_qgb
321
+
322
+ Followers allow you to include additional internal users (agents or administrators) on ticket notifications. Internal users can add followers to tickets. There's no limit to the number of followers you can include on a ticket.
323
+
324
+ Agents and administrators can use the Followers field in the properties panel of the ticket interface to add internal users to a ticket.
325
+
326
+ Internal users who can view the ticket can add followers to the ticket.
327
+
328
+ Followers can:
329
+
330
+ * Receive public comments and private comments added to the ticket conversation.
331
+ * Ability to make a private comments and public comment.
332
+ * Replying to a private comment creates a private comment and likewise for public comments.
333
+ * Remove themselves from the ticket conversation.
334
+ * Remain hidden from end users copied on the ticket.
335
+ * Access any ticket that they are following, even if they would not normally be allowed to access the ticket.
336
+
337
+ # Adding agents as followers from the ticket interface
338
+ If followers have been enabled by the administrator, internal users (your company's agents and administrators) can add followers from the Followers field from the properties panel in the ticket interface. Followers are internal users such as agents, light agents, and administrators that receive email notifications when a ticket is updated.
339
+
340
+ Note these things about using followers:
341
+
342
+ * Followers can add and receive public comments and private comments.
343
+ * Followers can reply to a public comment with a public comment, and reply to a private comment with a private comment.
344
+ * Followers can remove themselves from the ticket.
345
+ * Followers are hidden from copied (CC'd) end users and other followers on email notifications. Their name and email address don't appear in email notifications sent to other users. For more information about the email notifications that followers receive, see Best practices for using email clients with CCs and followers.
346
+ * If your administrator has enabled Automatically make an agent a follower, you can added internal users, such as agents and admins, to tickets as followers from ticket notifications by adding them to the reply as a CC. In this case, the agent becomes both a CC and a follower.
347
+ ## To add agents as followers from the ticket interface
348
+ * Select a ticket from one of your views.
349
+ The Followers field appears in the ticket properties panel on the left side.
350
+
351
+ * In the Followers field, enter a user's name, email domain, or organization name and the relevant results appear.
352
+ Internal users such as agents, light agents, and administrators can be followers.
353
+
354
+ * To quickly add yourself as a follower, click follow.
355
+
356
+
357
+
358
+ ## To remove a follower from the ticket interface
359
+ * Click the delete button (X) in the person's name box in the Followers list
360
+
361
+
362
+ * To quickly remove yourself as a follower, click unfollow.
363
+
364
+ * To add agents as followers from ticket notifications
365
+
366
+ * From your email client, open the ticket notification.
367
+ * Open the CC line, per your email provider’s instructions.
368
+ * Add the name of the user you want to add as a follower. Repeat as necessary.
369
+ * Add your comment and send the email.
370
+
13
371
 
14
372
 
15
373
  # 2.3.1
@@ -0,0 +1,31 @@
1
+ FROM node:12
2
+
3
+ RUN apt-get update
4
+
5
+ # Create app directory
6
+ WORKDIR /usr/src/app
7
+
8
+ ARG NPM_TOKEN
9
+
10
+ RUN if [ "$NPM_TOKEN" ]; \
11
+ then RUN COPY .npmrc_ .npmrc \
12
+ else export SOMEVAR=world; \
13
+ fi
14
+
15
+
16
+ # Install app dependencies
17
+ # A wildcard is used to ensure both package.json AND package-lock.json are copied
18
+ # where available (npm@5+)
19
+ COPY package*.json ./
20
+
21
+ RUN npm install --production
22
+
23
+ RUN rm -f .npmrc
24
+
25
+ # Bundle app source
26
+ COPY . .
27
+
28
+ EXPOSE 3000
29
+
30
+ CMD [ "node", "jobs.js" ]
31
+