从Dokku客人访问主机上可公开访问的服务

时间:2016-11-14 12:46:37

标签: networking dokku

我们正在转换为Dokku,作为此过程的一部分,数据库(PostgreSQL)将暂时在主机上直接运行。

数据库由遍布互联网的多个服务器使用,并可使用其公共IP进行访问。

我可以psql从任何服务器timeout访问它,包括托管它的服务器。

但是,从同一服务器上运行的Dokku来宾中我得到var app = angular.module('qaApp'); app.factory("paginationService", function($location) { /** * Create a Pagination object * @type {{}} */ var obj = {}; var url = $location.absUrl().split('/')[0]; obj.pages = []; /*if(url == 'test'){ obj.url = "/design/views/paginationtest.html"; }else{ obj.url = "/design/views/pagination.html"; }*/ /* pagination view url (html fragment */ obj.url = "/views/pagination.html"; obj.newUrl = "/views/pagination-new.html"; /* the last page */ obj.lastPage = 1; /* the current page */ obj.currentPage = 1; /* per page size */ obj.perPage = 1; /* total records */ obj.totalRecords = 1; /* record from */ obj.from = 0; /* record to */ obj.to = 1; /* set all the variable from the api */ obj.set = function(data) { if(data) { obj.lastPage = data.last_page; obj.currentPage = data.current_page; obj.perPage = data.per_page; obj.totalRecords = data.total; obj.from = data.from; obj.to = data.to; /* enable/disable the next button */ if(obj.currentPage == obj.lastPage) obj.nextDisabled = true; else obj.nextDisabled = false; /* enable/disable the previous button */ if(obj.currentPage == 1) obj.previousDisabled = true; else obj.previousDisabled = false; obj.setPages(); } }; obj.reset = function() { obj.lastPage = false; obj.currentPage = 1; obj.perPage = 1; obj.totalRecords = 0; obj.from = 0; obj.to = 1; obj.nextDisabled = true; obj.previousDisabled = true; obj.setPages(); }; obj.next /* travel to the next page */ obj.loadNext = function(loadAPIData) { obj.currentPage +=1; loadAPIData(obj.currentPage); }; obj.loadPage = function(loadAPIData, pageNo){ obj.currentPage = pageNo; loadAPIData(obj.currentPage); } /* travel to the previous page */ obj.loadPrevious = function(loadAPIData) { if(obj.currentPage == 1){ return; } obj.currentPage -=1; loadAPIData(obj.currentPage); }; /* travel to the last page */ obj.loadLast = function(loadAPIData) { obj.currentPage = obj.lastPage; loadAPIData(obj.currentPage); }; /* travel to the first page */ obj.loadFirst = function(loadAPIData) { obj.currentPage = 1; loadAPIData(obj.currentPage); }; /* if next button is enabled */ obj.nextDisabled = true; /* if previous button is enabled */ obj.previousDisabled = true; /* Code Added for Pagination with Numbering*/ obj.setPages = function () { var pages = []; totalPage = Math.ceil(obj.totalRecords / obj.perPage); var startPage = obj.currentPage; var endPage = totalPage; if(obj.currentPage > 3) { startPage = obj.currentPage - 3; //pages.push({'class': '' , 'pageNo' : 1 , 'label' : "<<"}); } if(totalPage > obj.currentPage + 3){ endPage = obj.currentPage + 3; } for (var i = startPage; i <= endPage; i++) { if (i == obj.currentPage) { pages.push({'class': 'active' , 'pageNo' : i, 'label' : i}); } else { pages.push({'class': '', 'pageNo' : i , 'label' : i}); } } obj.pages = pages; }; /* return the pagination object */ return obj; }); 。它似乎在某处阻止了对它的访问。

有关为何发生这种情况的任何想法?

0 个答案:

没有答案