Skip to content
Joshua Sierles edited this page Dec 29, 2015 · 4 revisions

high level overview

  • Update the RNPlayNative app dependencies and make sure it runs
  • Copy its package.json dependencies to react-native-packager-docker/package.json
  • Run the build script on the server as root, to create a docker image
  • Add the docker image to rnplay-web docker config
  • Use docker-compose to start/stop/restart the packager container
  • Packager should be available at its container name URL, i.e.: packager0170.rnplay.org

Login

Login to the server: ssh app@hetzner.rnplay.org

Update package.json dependencies

Make sure these dependencies are the same as in the RNPlayNative app package.json.

Then run

sudo ./build -v 0.17.0

This creates a Docker image for the 0.17.0 build. To confirm the build succeeded, run

docker images | grep 0.17.0

Update rnplay's docker config

Edit this file, copying previous packager entries to a new one with the RN version values updated.

https://github.com/rnplay/rnplay-web/blob/master/config/docker/production.yml

Run docker-compose to start the packager

Run the following command from the ~app/rails/rnplay directory.

docker-compose -f config/docker/production.yml -p rnplay up -d packager0170

This command is idempotent. If you build a new image with the same version number, it will be upgraded automatically by running this command.

To see packager logs:

docker logs --tail=10 -f rnplay_packager0170_1