与Docker和gulp的Jhipster应用程序开发 [英] Jhipster application development with Docker and gulp
问题描述
我正在使用Jhipster应用程序,并且正在使用docker运行此应用程序。这是工作,但它非常麻烦。
我想能够进行UI更改(文本,CSS,HTML等),并受益于gulp和browsersync,例如,更改为html文件,保存文件,并让浏览器自动刷新并显示更改。
但是,浏览器中唯一可以获取更改的方法是: / p>
1停止码头容器
2 stop gulp
3重建docker图像
4运行docker容器
5查看,再次浏览器
如你所见,这不是最佳的。
我如何简化这个,以便我可以快速部署更改为运行的docker容器,或使用gulp刷新浏览器与更改的前端文件?
在文件 gulp / config.js
,您可以更改 uri
和 apiPort
指向您运行的JHipster应用程序Docker容器。
例如,我的Docker使用IP 192.168.99.100,所以我将更改 uri
来匹配该值。请注意, uri
需要在其末尾加入一个冒号。
uri :'http://192.168.99.100:',
I am working on a Jhipster application, and am running this application using docker. This is working, however its very cumbersome.
I would like to be able to make UI changes (text, css, html etc) and benefit from gulp and browsersync, that is for example, make a change to an html file, save the file, and have the browser automatically refresh and show the change.
However, the only way I can get changes visible in the browser is to:
1 stop the docker container
2 stop gulp
3 rebuild docker image
4 run docker container
5 view, again, in browser
As you see, it is not optimal.
How then can I streamline this, so that I can either quickly deploy changes into the running docker container, or use gulp to refresh the browser with the changes fronted files?
In the file gulp/config.js
, you can change the values of uri
and apiPort
to point at your JHipster app running in a Docker container.
For example, my Docker uses the IP 192.168.99.100, so I would change uri
to match that value. Note that the uri
needs to include a colon at the end of it.
uri: 'http://192.168.99.100:',
这篇关于与Docker和gulp的Jhipster应用程序开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!