Tag: 量angular器

在docker运行的量angular器返回元素不存在,但在本地主机

我一直在尝试在Docker中运行一些量angular器testing,但是我发现了一个我无法解决的问题。 量angular器说这个元素不在Docker的网页里面,但是在localhost中。 此外,网页的CURL公开了HTML元素(正如你所知道的,而不是Angular组件中的HTML),但是仍然没有find元素。 首先,testing在localhost上正常工作: /*********** TESTING **********/ beforeAll(function(){ browser.sleep(1).then(function() { console.log('Browser running …'); }); browser.driver.manage().window().getSize().then(function(size) { console.log('Starting browser size', size); }); browser.get(specifiedURL+"/app/users/#/register"); browser.waitForAngular(); //We expect to wait for angular to be loaded so browser can load correctly his components browser.getCurrentUrl().then(function(url){ console.info("Browser redirected to "+url); }); browser.refresh(); //Refresh the view so it loads the content properly […]

Dockerize angular-cli 4项目在尝试运行“ng build –aot –prod”时失败

我正在尝试使用以下docker文件dockerize我的angular-cli项目:我确实遵循了以下步骤: https://github.com/avatsaev/angular4-docker-example —- DOCKER文件—— FROM nginx:1.13-alpine ENV APP_PATH /app ENV PATH $APP_PATH/node_modules/@angular/cli/bin/:$PATH RUN apk add –update –no-cache nodejs && mkdir $APP_PATH && rm -rf /etc/nginx/conf.d/* WORKDIR $APP_PATH COPY . . COPY nginx/default.conf /etc/nginx/conf.d/ ARG NPM_TOKEN COPY .npmrc .npmrc COPY package.json package.json RUN npm install ng build –aot –prod \ && rm -rf /usr/share/nginx/html/* \ && […]

在Docker中用Angular 4,Django和postgresql部署项目

我想部署在Heroku我的项目在Docker Angular 4前端与Django后端和postgresql数据库。 在这个时候我的文件看起来如下所示。 我记得确定这是否正确完成? 我使用heroku container:push web –app myproject推送它heroku container:push web –app myproject但它不起作用(日志)。 我假设如果我使用Docker,我不必创buildProcfile等? 可能错误是由于数据库迁移不足造成的? 我不知道我正在走向正确的方向,但我正在尝试迁移我的数据库。 也许我的错误是由缺乏数据库引起的? 当我运行heroku run python manage.py migrate ,我得到: django.db.utils.OperationalError:无法将主机名“db”翻译为地址:名称或服务未知 日志: 2017-07-07T10:27:30.448951+00:00 heroku[web.1]: State changed from crashed to starting 2017-07-07T10:27:30.436282+00:00 heroku[web.1]: Process exited with status 0 2017-07-07T10:27:50.846928+00:00 heroku[web.1]: Starting process with command `python3` 2017-07-07T10:27:53.350381+00:00 heroku[web.1]: Process exited with status 0 […]

Angular2泊坞窗,如何更改基本的URL?

我参与了一个基本上使用微服务概念的项目,使用angular2构buildUI,后端使用spring引导。 所有的微服务都在docker中部署,这里我们遇到了如何将后端url传递给angular的问题?

混合应用程序中没有使用ion3上的keycloakauthentication

我需要您在混合应用程序中使用keycloak进行身份validation的帮助。 我用docker运行keycloak。 我正在用ionic3,angular@4.1.3和cordova编写一个移动应用程序。 我创build了我的领域“演示”,并创build了有效的redirectURL = http:// localhost和Web Origins = http:// localhost的客户端“demo-client”。 我已经上传到我的应用程序这个package.json: { "realm": "demo", "auth-server-url": "http://192.168.238.60:8080/auth", "ssl-required": "external", "resource": "demo-client", "public-client": true } 我还添加了whiltelist和inappbrowser插件。 当我启动我的应用程序,然后点击login,我在inappbrowser中获得keycloak的login页面。 我注册,我回到我的应用程序perfeclty。 但是,我仍然没有在我的应用程序中进行身份validation,但是我的会话完全在keycloakpipe理控制台中打开。 看来我没有从应用程序中的keycloak服务器获取令牌和会话信息。 互联网上没有任何使用这些技术的信息。 如果有人已经进入了这些问题,那么帮助我将是非常好的。 最后一件事情是,当我在浏览器上用“离子服务”打开我的应用程序时,一切正在发现。 身份validation作品! =>似乎信息不会从浏览器回到应用程序。 这是我如何初始化keycloak。 在main.ts上 KeycloakProvider.init({ onLoad: "check-sso",checkLoginIframe: false }) .then(() => { platformBrowserDynamic().bootstrapModule(AppModule); }) .catch((e: string) => { console.log('Error in ng2 bootstrap: ' […]

CasperJS不会加载由Angular路由器注入的内容

我在GitHub上准备了一个示例项目 ,以配合我正在编写的关于如何为dockerized应用程序编写functiontesting的课程。 该应用程序有一个是Angular2单页面应用程序的一部分,我试图用CasperJStesting这个应用程序(我也试过与下面解释的相同问题的Behat)。 当在CasperJS中运行testing时,就好像Angular中的路由不会加载testing,因此我可以断言索引模板中的东西存在(例如页面标题),但是<app-root></app-root>标记不会加载testing。 代码 这里是索引模板: <!doctype html> <html lang="en"> <head <meta charset="utf-8"> <title>TestProject</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <app-root></app-root> </body> </html> testing是: casper.test.begin('Tests homepage structure', function suite(test) { casper.start('http://web', function() { // This works because the title is set in the "parent" template. test.assertTitle("TestProject", "Title is correct"); casper.wait(2000); // This fails, […]

Neo4j – 如何使用Docker镜像从安全连接访问螺栓?

Docker新手 所以我设法将正式的Neo4j EE Docker镜像部署到Google Container Engine,当从本地运行我的Angular应用程序时,一切都很好(因为它不是来自安全的连接)。 但是,当我将应用程序部署到Firebase时,应用程序将通过安全连接对DB / Docker容器进行所有调用,结果如下错误: Mixed Content: The page at 'https://luminate-testing-24112016.firebaseapp.com/dashboard' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://35.196.251.244:7687/'. This request has been blocked; this endpoint must be available over WSS. 请注意,无论Docker镜像是否部署到GKE或AWS,都会发生这种情况。 这里是我的yaml文件: apiVersion: v1 kind: Service metadata: name: neo4j spec: type: LoadBalancer loadBalancerSourceRanges: – […]

如何使用MySQL + PHP + nginx + Angular创buildDocker组合容器

我对Docker相当陌生。 我正在写一个angular度的应用程序,我想尝试在MySQL,PHP,Nginx的容器化系统中使用。 之后用sendmail。 我看了一些教程,但仍然有一些问题。 使用Docker Compose做这么小的应用程序是否明智? 什么是最好的方式来设置我的docker-compose-yml和dockerfiles? 谢谢您的帮助!

XMLHttpRequest无法使用keycloak和docker加载

我在Docker容器中运行keycloak。 Keycloak与angular度项目集成。 问题是login后redirect我的angular度项目显示以下错误。 XMLHttpRequest cannot load http://localhost:8080/auth/realms/tenant-11/protocol/openid-connect/token. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:4201' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute. zone.js:664 Error: Uncaught (in promise): undefined at resolvePromise (zone.js:795) at resolvePromise (zone.js:766) at […]

nginx.conf中的try_files不起作用

我正在使用angular度为2的应用程序,nginx和docker。 每当我用/ site重新加载一个页面时,它会给我一个404.我的服务器块看起来像这样: server { listen 0.0.0.0:80; listen [::]:80; root /var/www/project/html; index index.html; server_name project.com; location / { try_files $uri $uri/ /index.html; }} 我已经尝试了很多,并已经看到了所有其他的stackoverflow问题,并尝试了所有的可能性。 但没有任何工作。 有人可以帮忙吗? 更新:整个nginx.conf: user nginx; worker_processes auto; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr – $remote_user [$time_local] "$request" ' […]