These are chat archives for reactioncommerce/reaction

24th
Aug 2016
Philip Nuzhnyi
@callmephilip
Aug 24 2016 14:15
hey guys, i am trying to deploy a fork of RC using Docker following this tutorial here - https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker
unfortunately, it seems to be missing additional info regarding deploying forks. is there any additional doc regarding custom deployments?
Jeremy Shimko
@jshimko
Aug 24 2016 14:17
what isn’t working?
the only difference is you need to create a build instead of using our pre-built image
docker build -t your-image-name .
then the rest is identical
except for specifying your image name in the docker run command, of course
Philip Nuzhnyi
@callmephilip
Aug 24 2016 14:18
i am trying to build an image of the fork using docker build -t thebakery/cake .
and it's throwing an exception:

npm WARN reactcss@1.0.6 requires a peer of react-addons-test-utils@^0.14.8 || ^15.1.0 but none was installed.
/root/.meteor/packages/meteor-tool/.1.4.0-1.13j49n2++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/isopackets/ddp/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:165
throw error;
^

Error: spawn ENOMEM
at exports._errnoException (util.js:873:11)
at ChildProcess.spawn (internal/child_process.js:298:11)
at exports.spawn (child_process.js:362:9)
at Object.exports.execFile (child_process.js:151:15)
at /tools/isobuild/meteor-npm.js:576:32
at /tools/isobuild/meteor-npm.js:575:12
at /root/.meteor/packages/meteor-tool/.1.4.0-1.13j49n2++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/isopackets/ddp/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:32:39

building RC 0.15.0
Jeremy Shimko
@jshimko
Aug 24 2016 14:20
Sounds like a memory issue. How much do you have on the build machine?
Philip Nuzhnyi
@callmephilip
Aug 24 2016 14:21
so i did this, as per tutorial: eval "$(docker-machine env reaction)"
so i guess it's building an image on a remote host, right?
Jeremy Shimko
@jshimko
Aug 24 2016 14:21
yes
Philip Nuzhnyi
@callmephilip
Aug 24 2016 14:21
(sorry i am pretty new to Docker)
Jeremy Shimko
@jshimko
Aug 24 2016 14:21
no prob
Philip Nuzhnyi
@callmephilip
Aug 24 2016 14:21
that host has 1gb memory
Jeremy Shimko
@jshimko
Aug 24 2016 14:23
Ok, that’s generally just enough memory to run the app, but it may be pushing it for a build/compile - especially if anything else is already happening on the machine. You could try building it locally and pushing to Docker Hub first, then pull it from there to your remote machine.
Philip Nuzhnyi
@callmephilip
Aug 24 2016 14:25
k. makes sense. gonna give it a shot. do you know if there's a way to, say, build an image locally and then push it directly to a production machine?
Jeremy Shimko
@jshimko
Aug 24 2016 14:27
# create a local Docker host
docker-machine create -d virtualbox local-dev

# tell Docker to use it
eval "$(docker-machine env local-dev)"

# build your image
docker build -t thebakery/cake .

# push to Docker Hub
docker push thebakery/cake 

# switch to the remote machine
eval "$(docker-machine env reaction)"

# pull from Docker Hub
docker pull thebakery/cake 

# run it
docker run -d \
  -p 80:80 \
  -e ROOT_URL="http://<your app url>" \
  -e MONGO_URL="mongodb://<your mongo url>" \
  -e REACTION_EMAIL="youradmin@yourdomain.com" \
  -e REACTION_USER="admin-username" \
  -e REACTION_AUTH="admin-password" \
  thebakery/cake
Philip Nuzhnyi
@callmephilip
Aug 24 2016 14:28
massively helpful! thank you so much @jshimko!
Jeremy Shimko
@jshimko
Aug 24 2016 14:28
:+1:
The docker pull part is technically optional. The machine would try to do that anyway if the image didn’t exist on it. I was just trying to be more explicit for clarity.
Spencer Norman
@spencern
Aug 24 2016 17:19

Seeing 1 failed test on builds currently after we updated to 0.15

1) cart methods cart/removeFromCart when called with a quantity, should decrease the quantity:
I20160824-17:12:01.737(0)? 
I20160824-17:12:01.738(0)?       AssertionError: expected 2 to equal 0
I20160824-17:12:01.738(0)?       + expected - actual
I20160824-17:12:01.739(0)? 
I20160824-17:12:01.739(0)?       -2
I20160824-17:12:01.740(0)?       +0

Looks like it’s failing on reaction/master as well https://circleci.com/gh/reactioncommerce/reaction/2395

Any idea if this is a test bug or a method bug?

Brent Hoover
@zenweasel
Aug 24 2016 21:39
This is a test bug and it only fails about 1 out of 10-15 times in CI and never on my local machine
Spencer Norman
@spencern
Aug 24 2016 21:39
:+1:
Brent Hoover
@zenweasel
Aug 24 2016 21:40
I honestly don’t know why it’s failing although I have been working on it