jshimko / meteor-launchpad

A base Docker image for Meteor applications.
https://hub.docker.com/r/jshimko/meteor-launchpad/
MIT License
276 stars 152 forks source link

Hot code push isn't working #95

Closed occasl closed 6 years ago

occasl commented 6 years ago

I notice you use --server-only in your build-meteor.sh, but from the Meteor docs it states:

You can pass --server-only to only build the server bundle. This allows you to build your app without installing the mobile SDKs on the build machine. This is useful if you use an automated deployment setup for instance. (If you remove the mobile platforms before building instead, hot code push will be disabled because the assets for Cordova included in the server bundle will not be generated.)

I'm seeing that the Docker image is built and deployed fine but when I try to open it with my mobile client, I'm not seeing the updates I made to the UI. Would this be the reason why?

I obviously would want hot code push, so thoughts on how to get this to work?

jshimko commented 6 years ago

Unfortunately, I won't be able to help you much here. I've never used Meteor's Cordova integration and don't really plan to any time soon (I'd personally use React Native before I'd try to use Cordova at this point). So I probably don't have much useful advice. However, based on the quote you pasted above, it sounds to me like hot code push should work as long as you don't remove the mobile stuff from .meteor/platforms.

The --server-only was definitely intentional here because any time a user with mobile builds set up in their project tried to do a Docker build, it would throw errors and fail because of the missing mobile SDK's and you couldn't ever complete a build of the server side. So that flag was only added so you can do a build without Xcode or the Android SDK installed.

occasl commented 6 years ago

The issue turns out to be with the mobile build. You have to add the port as the protocol seems to be ignored. Favor --server myserver.com:443 over https://myserver.com when building for mobile devices.