These are chat archives for reactioncommerce/reaction

26th
Apr 2019
progranime
@progranime
Apr 26 00:11
hi @loan-laux please correct me if I'm wrong the version 1.16 does support multi-vendor right but in version 2.0 is it not anymore? thanks
Alvaro Bueno
@delagroove
Apr 26 08:23

Hi, is there any example of a migration or a plugin out there that creates a new Mongo Collection? i see most of the examples extends the schema or clones from it, I would like to create a new Collection, i tried adding the collections to the lib/collections folder and creating the collection and registering the schema with it, also registering the schema itself.
i have done this also in the client folder (much like the dicsount-codes plugin), calling the files in lib and has not worked either.
I have also tried creating a migration and did not show the Collections either.
any advice on how to create new collections?

PS: I’m using Azure cosmos DB to visualize my local mongo, could that be the issue (not refreshing)

Could be the issue of creating empty schemas the reason of why they are not showing up?

Thanks guys!
i have followed https://docs.reactioncommerce.com/docs/next/simple-schema
and
https://docs.reactioncommerce.com/docs/database-migrations

Alvaro Bueno
@delagroove
Apr 26 08:32

do i need to add the schema here?
imports/node-app/devserver/schemas.js

It says in the guide that all custom plugins that have the lib/collections structure will be taken from the build but it looks like it’s not happening,

These plugins define collections and attach a Schema to it.
However, I think there currently is an issue in the way these are defines outside of thr meteor code(to be available from context):
https://github.com/reactioncommerce/reaction/blob/master/imports/node-app/core/util/defineCollections.js
You would need to change this in core code, but I might be wrong and there is a way of adding this to contect inside of the plugin code
Alvaro Bueno
@delagroove
Apr 26 11:00
@janus-reith I’ll take a look, thanks!
Alvaro Bueno
@delagroove
Apr 26 11:08
I was trying to avoid going to core but it looks necessary for this case
Alvaro Bueno
@delagroove
Apr 26 13:24
@janus-reith thanks!, found it in server/no-meteor/startup
Aesop7
@Aesop7
Apr 26 13:54
Hi all, bumping my question about shop > marketplace for "Allow Merchant Signup" - what is the capability that checkbox provides?
I wonder if maybe the functionality is still needs to be implemented in the RC?
Loan Laux
@loan-laux
Apr 26 14:00
@Aesop7 The "Allow Merchant Signup" checkbox enables people to create vendor accounts on the marketplace. It worked out of the box back when Reaction was fully relying on Meteor, but now you'll have to tinker a bit to get it to work. The first thing would be exposing your backend containers to the outside world, as right now I imagine that they're not.
Second, I'm not sure if the sign-up flow still supports this or not. Probably not, so you'll have to make some changes there too.
Aesop7
@Aesop7
Apr 26 14:52
I was going to try to implement ng a merchant sign up within the starterkit... Is that heading down the wrong path?
Right now all of the development is being done locally
So adjusting the containers should be relatively easy
Loan Laux
@loan-laux
Apr 26 14:57
Well, none of the identity stuff is handled directly from the starterkit anyways. It's all through Hydra and Meteor, so you'll be fine in terms of workload for that. However, if you want to provide vendor-focused features from a detached UI, you have to know that there are no GraphQL queries/mutations implemented right now for the admin/vendor functionalities. I would also strongly discourage implementing such a vendor dashboard straight on the Next.js starterkit as it has nothing to do with the customer interface. My advice would be to create a new satellite project for that, give it its own subdomain, implement the GraphQL queries/mutations you need on the backend and consume them from there.
Obviously that's a lot of work. But it's not impossible if you plan it right.
Daniel Honig
@dhonig
Apr 26 16:39
Hydra isn't required any OAuth2.0 provider can work. However better to follow the platform.
Guus Huizen
@iAmGuus
Apr 26 17:16
Hi, how long does it usually take for Reaction to boot up on the first start?
Loan Laux
@loan-laux
Apr 26 17:17
@iAmGuus 10-15 minutes maximum
That would be on a slow machine
Guus Huizen
@iAmGuus
Apr 26 17:17
I am on a MBP 2015 with 8gb of ram
Ok but thanks for the approximation, was thinking already why itd be taking so long but thats just normal then I Guess.
Loan Laux
@loan-laux
Apr 26 17:20
Make sure to bump your Docker RAM allocation to 6GB at least for the build to go smoothly
Daniel Honig
@dhonig
Apr 26 17:28
Thats right for osX @loan-laux docker on Linux seems to automatically handle the reaction requirements.
Loan Laux
@loan-laux
Apr 26 17:29
Yeah, Docker on macOS sucks big time, I guess everybody knows at this point
Daniel Honig
@dhonig
Apr 26 17:29
it sucked alot worse in the past!
OCI initiative has helped alot
Loan Laux
@loan-laux
Apr 26 17:29
Pretty sure Docker for Windows needs this to be set as well beforehand
Daniel Honig
@dhonig
Apr 26 17:29
one tip is that in the last version of Docker buildkit eas introduced
export DOCKER_BUILDKIT=1 to use buildkit for more efficient builds
Loan Laux
@loan-laux
Apr 26 17:30
I'll try that out :+1:
Patrick Newell
@pnewell4_twitter
Apr 26 17:31
fwiw, i have completely bailed on Docker for development, and spin up the three services individually. I have a separate machine for building & deploying because it renders my MBP useless for anything else. I'm sure it will get better, but until then...
Loan Laux
@loan-laux
Apr 26 17:32
Yeah I feel you @pnewell4_twitter. The memory leaks are killing me. Eats up my 16GB of RAM completely and then swaps until it hits the max. Even with no container running it takes up 5GB... Ridiculous.
Considering switching to Linux for development. That's how pissed I am by this.
Daniel Honig
@dhonig
Apr 26 17:49
I'm doing alot of heavy work with erlang/elixir and Docker
no problem in MBP
I'll check and see if I can give you guys some tips
Guus Huizen
@iAmGuus
Apr 26 18:07
@loan-laux where do I bump that up?
Paul Hoza
@PaulHoza
Apr 26 18:16
@iAmGuus If you're asking about RAM allocation for a Mac, I was sent this previously: https://i.ibb.co/P6DwZqq/Screen-Shot-2019-04-18-at-13-02-13.png
I'm on Linux though, so can't help more than a link. :)
Daniel Honig
@dhonig
Apr 26 18:22
@PaulHoza yeah I havent had these issues on Linux. Thanks for posting that
Aesop7
@Aesop7
Apr 26 22:31
@loan-laux , what are the parts/data models that need to be opened up? And will those be changing in the next 6 months?