This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DuplexChannelFactory<imessagesenderwithcallback> duplexChannelFactory = | |
new DuplexChannelFactory<imessagesenderwithcallback>(this, binding, endpointAddress); | |
IMessageSenderWithCallBack duplexMessageSender = duplexChannelFactory.CreateChannel(endpointAddress); | |
duplexMessageSender.Subscribe(); | |
duplexMessageSender.ShowMessage("message"); | |
duplexMessageSender.Unsubscribe(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:12-alpine | |
RUN mkdir /home/node/app/ && chown -R node:node /home/node/app | |
WORKDIR /home/node/app | |
COPY --chown=node:node package*.json ./ | |
USER node |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const process = require('process'); | |
var app = {}; | |
process.on('SIGINT', function onSigint() { | |
app.shutdown(); | |
}); | |
process.on('SIGTERM', function onSigterm() { | |
app.shutdown(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Tini | |
ENV TINI_VERSION v0.18.0 | |
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini | |
RUN chmod +x /tini | |
ENTRYPOINT ["/tini", "--"] | |
# Run your program under Tini | |
CMD ["node", "index.js"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.shutdown = function () { | |
server.close(function onServerClosed(err) { | |
if (err) { | |
log.error('An error occurred while closing the server: ' + err); | |
process.exitCode = 1; | |
} | |
}); | |
process.exit(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const config = require('./config'); | |
const log = require('./log'); | |
const constants = require('./constants'); | |
const options = { | |
host: 'localhost', | |
port: config.httpPort, | |
timeout: 2000, | |
method: 'GET', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Create and export configuration variables used by the API | |
* | |
*/ | |
const constants = require('./constants'); | |
// Container for all environments | |
const environments = {}; | |
environments.production = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Container for all environments | |
const environments = {}; | |
environments.production = { | |
httpPort: process.env.HTTP_PORT || 3000, | |
host: process.env.HOST || '0.0.0.0', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
workflowdb: | |
image: 'mongo:4.0.14' | |
container_name: 'workflow-db' | |
environment: | |
- MONGO_INITDB_ROOT_USERNAME=mveroot | |
- MONGO_INITDB_ROOT_PASSWORD=2020minivideoencoder! | |
- MONGO_INITDB_DATABASE=workflow-db | |
volumes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.createUser({ | |
user: 'mve-workflowengine', | |
pwd: 'mve-workflowengine-password', | |
roles: [ | |
{ | |
role: 'readWrite', | |
db: 'workflow-db', | |
}, | |
], | |
}); |