These are chat archives for mirumee/saleor

17th
Aug 2018
Filip Kucharczyk
@Pacu2
Aug 17 2018 06:07
@joshkpeterson we have django-storages installed, which can be used for storing the files directly on Amazon S3, there's integration guide for it https://saleor.readthedocs.io/en/latest/deployment/s3.html, also you will need to set STATIC_URL env variable for the webpack.
Marcin Gębala
@maarcingebala
Aug 17 2018 08:09
@haoyuc1_twitter What client do you use to browse GraphQL? The default one provided with Saleor (GraphiQL) doesn't support setting authorization headers.
You can use the standalone version that supports headers: https://electronjs.org/apps/graphiql
Or try with a different client e.g Postman
Stephen Moloney
@stephenmoloney
Aug 17 2018 16:41
Hi there. I'm thinking of using Saleor. I'm just taking a look at the github repo today. I am getting the feeling that a big move from traditional MVC type architecture to a single page app architecture is soon to occur. Is that a fair assessment?
If this is true, then perhaps it is an opportunity to split the application into a microservices style architecture. I'm only new so I might not have a full picture yet.
Stephen Moloney
@stephenmoloney
Aug 17 2018 16:55
How is it going to be released - incrementally or one big transition, presumably with a painless migration from the old version ?
I know this is a good few questions - hope you can answer them. Thanks, Stephen
NyanKiyoshi
@NyanKiyoshi
Aug 17 2018 18:11
I noticed the transifex link is gone from the readme, is this accidental or voluntary?
NyanKiyoshi
@NyanKiyoshi
Aug 17 2018 18:37
Wouldn't the field apply_once_per_order of the Voucher model which is labeled Only apply once per order, be better labeled Only apply on the sum of the discounted products? It was quite confusing to get the meaning of this to translate it (c.f. https://github.com/mirumee/saleor/commit/31970d095b18980dea23ad77098c67cd84a5584b#diff-81e3ee0e94081771b5a11ce152ba7b0dR177)
Saqib khan
@saqibkhan2523
Aug 17 2018 18:45
What is health_check method for in wsgi. I was getting wsgi_mod error so I commented it in __init__.py. Is it ok to do so?
NyanKiyoshi
@NyanKiyoshi
Aug 17 2018 18:46
By any chance, was it an ImportError or failing to get [saleor.wsgi].health_check?
Saqib khan
@saqibkhan2523
Aug 17 2018 18:47
Here it is
[Thu Aug 16 06:01:29.739368 2018] [wsgi:error] [pid 19346:tid 140254052517632] [remote 39.45.252.79:9712] from .health_check import health_check # noqa [Thu Aug 16 06:01:29.739387 2018] [wsgi:error] [pid 19346:tid 140254052517632] [remote 39.45.252.79:9712] ModuleNotFoundError: No module named '_mod_wsgi_ef45d16da4dfa0305bb6c003d6555503.health_check'; '_mod_wsgi_ef45d16da4dfa0305bb6c003d6555503' is not a package
Filip Kucharczyk
@Pacu2
Aug 17 2018 18:48
@NyanKiyoshi Actually I think that transifex could be added to Contributing section ( I think I've dropped it by the mistake during the readme rework)
And yeah, I couldn't find a proper name for the apply_once_per_order field, stil llooking for some inspiration
NyanKiyoshi
@NyanKiyoshi
Aug 17 2018 18:54

@saqibkhan2523 could you send the whole apache config file? There may an issue with the passed arguments to WSGIDaemonProcess, and you probably would need to set the PYTHON_PATH to include saleor as well if not already done (it won't fix your error though)

If you send it I will be able to take a look in a few hours

Saqib khan
@saqibkhan2523
Aug 17 2018 18:55
@NyanKiyoshi where can i send you?
NyanKiyoshi
@NyanKiyoshi
Aug 17 2018 18:55
In private message it's fine.
HAOYU CHEN
@haoyuc1_twitter
Aug 17 2018 20:42
@elwoodxblues Oh! Thanks very much. I will try your suggestion. I am now using React-Apollo to communication with saleor. Do you have any idea to set up header in React-Apollo?
NyanKiyoshi
@NyanKiyoshi
Aug 17 2018 23:22

@saqibkhan2523 for the SECRET_KEY environment variable, if you still want to set your environment variables, the way I do in production is to have an executable file to launch to start the httpd server.

Saying that /opt/python/env contains:

export SECRET_KEY=hello

And, /usr/bin/saleorhttpd (or /opt/python/saleorhttpd), is:

source /opt/python/env \
  && exec /usr/sbin/httpd -DFOREGROUND

Then you configure supervisor (for production at least), to launch /usr/bin/saleorhttpd instead of httpd

In the case of

SetEnv SECRET_KEY abc

It will only pass the environment variable every time a WSGI request is being done.

...the simplest way remains nginx :tada: