Hello everyone! I’m running a server locating in China. I know it is hard to connect to github and npm mirror, so I set up a network proxy in containers/app.yml
by
templates:
- "templates/web.china.template.yml"
...
env:
HTTP_PROXY: http://172.17.0.1:10808
HTTPS_PROXY: http://172.17.0.1:10808
ALL_PROXY: http://172.17.0.1:10808
This works fine until Discourse use ember-cli to build frontend assets in rebuilding. So I set the npm registry to a mirror server (in China) by
hooks:
after_bundle_exec:
- exec:
cmd:
- su discourse -c 'git config --global http.proxy $HTTP_PROXY'
- su discourse -c 'git config --global http.proxy $HTTPS_PROXY'
- su discourse -c 'yarn config set registry https://registry.npmmirror.com/'
Though this can build an image successfully, it take too much time (more than 1900 seconds) in executing su discourse -c 'yarn install --production && yarn cache clean'"
when I need to upgrade a instance.
I wonder if this is normal or how to decrease the time. Thanks!