Jhipster application development with Docker and gulp

若如初见. 提交于 2020-01-03 04:34:12

问题


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?


回答1:


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:',



来源:https://stackoverflow.com/questions/38955146/jhipster-application-development-with-docker-and-gulp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!