update ports and variables for docker compose bootstrap

This commit is contained in:
Martin Guether
2017-04-07 11:55:07 +02:00
parent a3e2129b79
commit f9cf8ba7e8
9 changed files with 49 additions and 35 deletions

View File

@@ -32,31 +32,36 @@ module.exports = {
};
phantom.create({ path: require('phantomjs-prebuilt').path }, function (err, browser) {
return browser.createPage(function (err, page) {
console.log("page created, opening ",space_url);
if(err){
console.err(err);
}else{
return browser.createPage(function (err, page) {
console.log("page created, opening ",space_url);
if (type=="pdf") {
var psz = {
width: space.advanced.width+"px",
height: space.advanced.height+"px"
};
page.set('paperSize', psz);
}
if (type=="pdf") {
var psz = {
width: space.advanced.width+"px",
height: space.advanced.height+"px"
};
page.set('paperSize', psz);
}
page.set('settings.resourceTimeout',timeout);
page.set('settings.javascriptEnabled',false);
page.set('settings.resourceTimeout',timeout);
page.set('settings.javascriptEnabled',false);
return page.open(space_url, function (err,status) {
page.render(export_path, function() {
on_success_called = true;
if (on_success) {
on_success(export_path);
}
page.close();
browser.exit();
return page.open(space_url, function (err,status) {
page.render(export_path, function() {
on_success_called = true;
if (on_success) {
on_success(export_path);
}
page.close();
browser.exit();
});
});
});
});
});
}
}, {
onExit: on_exit
});

View File

@@ -5,7 +5,7 @@ const websockets = require('./websockets');
module.exports = {
connectRedis(){
const redisHost = process.env.REDIS_PORT_6379_TCP_ADDR || 'localhost';
const redisHost = process.env.REDIS_PORT_6379_TCP_ADDR || 'sync';
this.connection = new RedisConnection(6379, redisHost);
},
sendMessage(action, model, attributes, channelId) {

View File

@@ -6,6 +6,15 @@ AWS.config.region = 'eu-central-1';
var fs = require('fs');
var config = require('config');
var cdn = config.get("storage_cdn")
var storage_endpoint = 'http://storage:9000';
const bucketName = "sdeck-fresh-development";
const ep = new AWS.Endpoint(storage_endpoint);
const s3 = new AWS.S3({
endpoint: ep
});
module.exports = {
removeFile: (path, callback) => {
const s3 = new AWS.S3({

View File

@@ -3,7 +3,7 @@ require('../models/schema');
const WebSocketServer = require('ws').Server;
const Redis = require('ioredis');
const RedisConnection = require('ioredis');
const async = require('async');
const _ = require("underscore");
const mongoose = require("mongoose");
@@ -12,7 +12,7 @@ const crypto = require('crypto');
module.exports = {
startWebsockets: function(server){
this.setupSubscription();
this.state = new Redis(6379, process.env.REDIS_PORT_6379_TCP_ADDR || 'localhost');
this.state = new RedisConnection(6379, process.env.REDIS_PORT_6379_TCP_ADDR || 'sync');
if(!this.current_websockets){
this.current_websockets = [];
@@ -117,7 +117,7 @@ module.exports = {
},
setupSubscription: function() {
this.cursorSubscriber = new Redis(6379, process.env.REDIS_PORT_6379_TCP_ADDR || 'localhost');
this.cursorSubscriber = new RedisConnection(6379, process.env.REDIS_PORT_6379_TCP_ADDR || 'sync');
this.cursorSubscriber.subscribe(['cursors', 'users', 'updates'], function (err, count) {
console.log("[redis] websockets to " + count + " topics." );
});