These are chat archives for reactioncommerce/reaction

1st
May 2017
ushadev
@ushadev
May 01 2017 04:07
where to place .js and .min.js (jquery plugin) in reaction so that they get recognized in my plugin. right now i placed them in /imports/plugin/custom/myPlugin/lib/ folder.
and also added the path in index.js
Devil
@devilthemes
May 01 2017 05:09
How can I see demo for this Reaction ?
Brent Hoover
@zenweasel
May 01 2017 05:11
The best way is just to install and run it locally
septk
@septk
May 01 2017 10:11
@Stat1c14 If you see your collection shipping, you will see that shopID value is "null"
change for ID from your shop, you can know this value from your shops collection
David326k
@David326k
May 01 2017 10:15
Hi people, When I'm trying to push my files to heroku (based on your documentation and with my custom Mongodb URL), I can't run reaction. But if I try to set mongolab addon, all thats running... How can I resolve this? I have a config variable with value of mongo_url, this is not valid?
by the way, it is possible to have a custom docker image with my code?
Brent Hoover
@zenweasel
May 01 2017 10:31
The Heroku instructions are community contributed and we don’t support it, but I think people have had luck following those instructions
David326k
@David326k
May 01 2017 10:44
@zenweasel I followed these instructions, unique problem was that heroku created mlab (I put my mongo_url to my external cluster in a config variable...)
Brent Hoover
@zenweasel
May 01 2017 10:45
I’m unclear on what your problem is
David326k
@David326k
May 01 2017 11:37
I don't want to use mlab, and heroku all time is creating mlab addon
I can't relation my mongodb and heroku, and I set my mongo_url..
terrelltechsup
@terrelltechsup
May 01 2017 13:27
@zenweasel what @David326k is referring to I also ran into. Despite creating your own mlab database prior to deployement and setting the mongo_url config variable, when the deployment runs heroku automatically instantiates a new sandbox mlab mongodb regardless
terrelltechsup
@terrelltechsup
May 01 2017 13:53
this results in other problems related to the database that some of us were discussing a few days ago
septk
@septk
May 01 2017 14:10
@terrelltechsup exactly! Do you have an alternative for this?
terrelltechsup
@terrelltechsup
May 01 2017 14:14
given the current "in flux" state of this project I would say it is probably best to be working with it locally and let meteor handle the mongodb part. There are a lot of players and a lot of updates going on right now. That is how I felt at least so this is what I did.
terrelltechsup
@terrelltechsup
May 01 2017 14:21
the problem with heroku is that you do not have access to the meteor/reaction cli as far as I could tell. If anyone knows otherwise please let us know how that works.
Spencer Norman
@spencern
May 01 2017 15:15
@terrelltechsup you shouldn’t have access to the meteor or reaction CLI on a deployed instance if you’re building for production. If you’re trying to run Meteor / Reaction in development mode on Heroku, you’re going to have other problems (not enough memory, slow response times due to the number of files your browser has to download, etc).
Once you’ve built Reaction for production, it’s just a node app and the Reaction and Meteor CLI tools won’t be available
finseth
@finseth
May 01 2017 15:18
Hi guys, does anyone know how I can change the reaction commerce port from default 3000 with environment variable? Is it just PORT?
Spencer Norman
@spencern
May 01 2017 15:18
Yeah - reaction run —port 4000 (that’s two -
err, I guess that’s not quite what you asked, is that what you’re looking for or are you talking about in production?
finseth
@finseth
May 01 2017 15:25
thanks but no, not not exactly what I'm looking for. what is the environment variable you use when deploying docker image in production?
Spencer Norman
@spencern
May 01 2017 15:26
You should use a reverse proxy such as nginx to map port 80 to 3000 in production
Jeremy Shimko
@jshimko
May 01 2017 15:26
you can do that, but you don’t even need to. Just map the port with the Docker command
docker run -p 80:3000 ...
finseth
@finseth
May 01 2017 15:27
yes I do, but I need to change the port from 3000 to 5000
Spencer Norman
@spencern
May 01 2017 15:27
or that :point_up:
Jeremy Shimko
@jshimko
May 01 2017 15:27
so…
docker run -p 5000:3000
finseth
@finseth
May 01 2017 15:29
no thats not what I mean. I need to configure reaction to listen to port 5000 instead of the default 3000.
Devil
@devilthemes
May 01 2017 15:29
I am webdesigner if I design themes for reactioncommerce can I sell themes ?
Jeremy Shimko
@jshimko
May 01 2017 15:31
@finseth can you tell me why that won’t work? It literally accomplishes exactly what you said you need.
all traffic on port 5000 will go to the app
finseth
@finseth
May 01 2017 15:34
@jshimko Its because I am trying to deploy the official docker image to deis workflow running on GKE, and docker image based deployments need to listen to port 5000
Jeremy Shimko
@jshimko
May 01 2017 15:35
I use Deis every day with Reaction. That hasn’t been my experience. You sure about that?
finseth
@finseth
May 01 2017 15:35
Hmm, no not really. Mind if I PM?
Jeremy Shimko
@jshimko
May 01 2017 15:37
I answer the same questions regularly, so let’s keep it in here so others can potentially benefit from it.

https://deis.com/docs/workflow/applications/using-dockerfiles/

Note that if you are using a private registry of any kind (gcr or other) the application environment must include a $PORT config variable that matches the EXPOSE'd port, example: deis config:set PORT=5000.

You misread that. It was just an example port number
finseth
@finseth
May 01 2017 15:40
ah
Jeremy Shimko
@jshimko
May 01 2017 15:41
and $PORT is already set to 3000, so you should be good
finseth
@finseth
May 01 2017 15:42
Ok, but I still get a 502 even though the process is running and logs show no errors? Have you done any modifications to your Deis workflow router settings?
Jeremy Shimko
@jshimko
May 01 2017 15:42
yep
take a look at your router logs. you likely have a warning about proxy buffer size
finseth
@finseth
May 01 2017 15:43
just a sec, let me check
Jeremy Shimko
@jshimko
May 01 2017 15:44
you need to set that nginx config with annotations
https://github.com/deis/router#proxy-buffers-size
this is what I have.
annotations:
  router.deis.io/nginx.proxyBuffers.enabled: "true"
  router.deis.io/nginx.proxyBuffers.busySize: "16k"
  router.deis.io/nginx.proxyBuffers.number: "4"
  router.deis.io/nginx.proxyBuffers.size: "16k"
EDITOR=nano kubectl --namespace deis edit deploy deis-router
finseth
@finseth
May 01 2017 15:48
awesome man, hope that works for me
i'll give it a go and let you know
Jeremy Shimko
@jshimko
May 01 2017 15:49
:+1:
finseth
@finseth
May 01 2017 15:49
this is from my logs btw: 2017/05/01 15:25:50 [error] 676#0: *444476 upstream sent too big header while reading response header from upstream,
Jeremy Shimko
@jshimko
May 01 2017 15:49
yep, that’s the one
that config above fixes that
finseth
@finseth
May 01 2017 16:05
Thank you so much, you just made my day :+1: :smile:
finseth
@finseth
May 01 2017 17:29
@jshimko i just ran into another problem, do you have a second?
Jeremy Shimko
@jshimko
May 01 2017 17:29
what’s up?
finseth
@finseth
May 01 2017 17:34
Everything works well when I only set ROOT_URL, but when I have MAIL_URL and MONGO_URL defined I get "ERROR (app::deploy): Readiness probe failed: dial tcp 10.0.1.132:3000: getsockopt: connection refused" and the process won't start. Have you seen this before?
Jeremy Shimko
@jshimko
May 01 2017 17:34
sounds like the app may not be connecting to your database.
finseth
@finseth
May 01 2017 17:39
that's what I thought too, but the collections are being created in the database so I must be connecting
*it
can you try to spin one up with deis pull reactioncommerce/reaction:latest with only ROOT_URL and PORT envs set to see if it happens for you?
Jeremy Shimko
@jshimko
May 01 2017 17:43
did you set the PORT env to something else?
finseth
@finseth
May 01 2017 17:43
no just 3000
oh and MONGO_URL as well
finseth
@finseth
May 01 2017 18:09
the problem was that it was timing out before reaction had time to finish setting up. Increasing DEIS_DEPLOY_TIMEOUT to a higher value fixed it
thanks again @jshimko
Jeremy Shimko
@jshimko
May 01 2017 18:10
Ah, yeah. forgot to mention that
Spencer Norman
@spencern
May 01 2017 20:13
This message was deleted