reactioncommerce / mailchimp-open-commerce-helm-chart

Helm chart for deploying Mailchimp Open Commerce ontop of Kubernetes/Openshift.
Apache License 2.0
3 stars 4 forks source link

Add NODE_ENV as value for api to allow graphql playground #12

Closed cmbirk closed 4 years ago

cmbirk commented 4 years ago

It looks like we need to enable a setting for NODE_ENV other than production so that it's possible to create a deployment that has a graphql playground available.

ghost commented 4 years ago

Thinking out loud. It sounds like OP is looking to enable GQL playground for development builds (substitute for your own environments). Is that correct? I noticed in the Reaction Development platform itself graphql is available for production builds at the URL https://api.reaction.local/graphql (substitute for your URL) thereby making the API available to outside consumers. Is that something which servicing this issue could help achieve?

dcrdev commented 4 years ago

So because NODE_ENV = production , the default is that playground is disabled. Playground can be independently controlled via the GRAPHQL_PLAYGROUND_ENABLED var, I would be happy to add that as a chart value. NODE_ENV as a chart value is not typically the done thing, so not sure on that one.

I am however contemplating adding an additional environment variables section to the values, that would allow you to inject your own custom environment variables without modifying the chart.

Thoughts?

ghost commented 4 years ago

I am however contemplating adding an additional environment variables section to the values, that would allow you to inject your own custom environment variables without modifying the chart.

I haven't personally tried the Helm Chart yet but it's on my list of TODOs. If it works anything like Compose files, perhaps an override.yml file of some sort could be used to adjust existing ENV vars only so as not to confuse what's in Reaction proper with the Helm Chart. Otherwise perhaps a prefix (e.g. HELM_) could be used? In Storefront, there's some specific care needed to ensure server-side env vars aren't leaked into the generated bundles AFIAK—something also to consider.

dcrdev commented 4 years ago

Added support for playground in https://github.com/slingshotlabs/reaction-oss-helm-chart/pull/14

Closing this issue and will create another for adhoc config.