Closed robtec closed 1 year ago
side-note, I'm using stripe as a payment backend
Hi!
If you want to run the storefront inside a docker container you can use the build & start targets to get a production express server started. There are some projects that demonstrate how you can achieve this with a dockerfile, e.g. https://github.com/garand/remix-azure-docker
As for Stripe payments: You should just follow the instructions mentioned in the Readme and use your live public key instead of the test public key. Be sure to do the same in the backend with your secret key.
If you come across some other issues I'm happy to assist!
So when I click
I get
Guessing I'm missing something in the config?
This sounds like the storefront is not using the createStripePaymentIntent
mutation. How did you configure the stripe plugin and payment method in your backend? Does the payment method contain the word stripe in the payment method code?
I used the default storefront code, I didn't make any changes to the remix-storefront, the remix-storefront comes default with stripe working correct? or so I need to add some custom code to the storefront
That is correct, on the frontend part you must just configure the publishable key as mentioned in the Readme. But the backend you use must enable the Stripe Plugin and you must create a payment method that uses said Stripe Plugin. This isn't the case on a fresh vendure installation nor on the demo instance that the Remix Storefront will access on default.
So I have the backend configured
Also here is the vendure-config.ts
https://github.com/robtec/vendure-docker-deploy/blob/main/src/vendure-config.ts
Guessing I screwed up the config above
Change the code in your screenshot from standard-payment to stripe and it should work. The storefront uses the payment code to determine which payment flow should be used
You are a legend! That worked, can't believe I never spotted that. Thank you 👍
Hi, just because it came into my mind: For production use be sure to change the cookie secret in app/sessions.ts
I'll add that to the README file shortly.
Hi,
I'm trying to run this storefront in a docker container but I'm nor sure what
npm
goal I should be running to pickup the.env
variables are run as productionAny help would be great