Deploy with "slc build --pack" using datasources.production.json
When I "export NODE_ENV=production", then "slc run",it go with datasources.production.json. When I "slc build --pack", then "slc deploy http://localhost:7777 xxx-x.x.x.tgz", it go with datasources.json. Is there something missing? Thanks.
@sam-github @rmg Should these types of questions go to https://groups.google.com/forum/#!forum/strongloop?
You need to set NODE_ENV in the deployed environment: slc ctl -C http://localhost:7777/ env-set NODE_ENV=production
@superkhau we can answer these questions here, but only when pinged, I don't subscribe to loopback. And yes, the email list or any github issue tracker for strongloop, strong-deploy, etc. would reach us faster.
@sam-github Sounds good, I will ping you guys directly here if I see anymore of these. We just close questions straight away on the LB team and forward users to the mailing list. I will also ask users to create issues in the strongloop-* repos directly. TY.
@makersu Is this good to close? Did @rmg's solution work for you?
I'd like to create a deployable .tgz package file(slc build --pack), and when I deploy it(slc deploy http://localhost:7777 xxx-x.x.x.tgz), it'll use "datasources.production.json" file. Many Thanks.
@makersu Did you try @rmg's solution yet?
You need to set NODE_ENV in the deployed environment: slc ctl -C http://localhost:7777/ env-set NODE_ENV=production
Can I close this issue yet?
@makersu I'm going to close this. Reopen if you are still having trouble.