Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Suggestion: Reaction Commerce #54

Open
junaid33 opened this issue Apr 13, 2019 · 5 comments
Open

App Suggestion: Reaction Commerce #54

junaid33 opened this issue Apr 13, 2019 · 5 comments

Comments

@junaid33
Copy link

Please tell us what app you'd like to see on CapRover as a one-click app.
Reaction Commerce

Do you know if there is any official Docker image for the app?
https://hub.docker.com/r/reactioncommerce/reaction/

@funkhauscreative
Copy link

Hi @junaid33 ,

where you able to run Reaction Commerce on CapRover? I tried to run it based on the docker image you provided. It seems like the app is running fine, but when I try to access the apps URL, I always get an NGINX Error 502.

Can you maybe share a repo or captain-definition that you have used to get it running?

@githubsaturn
Copy link
Collaborator

Go to apps settings, under htttp tab, scroll down to the bottom, change container HTTP port to 3000.

@funkhauscreative
Copy link

Hi thanks!

Can I also ask you how you deployed it?

@githubsaturn
Copy link
Collaborator

  • Create a mongodb app using one-click app, call it mydatabase.

  • Create a regular app, call it reaction

  • Go to the App Config tab, and click on BULK EDIT under environmental variables, copy and paste this:

ROOT_URL=http://localhost
REACTION_EMAIL=you@example.com
REACTION_AUTH=mystrongpass
REACTION_USER=myusername
MONGO_URL=mongodb://root:mYMonGoDbPasSwOrd@srv-captain--mydatabase

Note that if you have a non alpha numeric password for MongoDB, you have to adjust your URL (URL encoding)

  • Go to the deploy tab and copy and paste this FROM reactioncommerce/reaction:latest under deployment method 4: Deploy plain Dockerfile
  • Deploy Dockerfile
  • Wait for build to be finished.
  • One last bit is that Reaction uses a very large header which breaks default nginx header buffer size, so you have to go and EDIT NGINX CONFIG under http settings tab and find this block:
            proxy_pass $upstream;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;

and add 3 lines, right below the previous chunk

            proxy_pass $upstream;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            # NEW LINES:
            proxy_buffer_size          128k;
            proxy_buffers              4 256k;
            proxy_busy_buffers_size    256k;

finally set the HTTP container port to 3000, and done!

@funkhauscreative
Copy link

Hi there,

Ìm very sorry to open this discussion again, but unfortunately it’s still not working. However we are able to load the login page. As far as my understanding goes, reaction is using websockets. I turned it on and even enabled https, but the admin panel is still not loading after login. The console tells me that the websocket connection was unsuccessful, so I believe there’s is some extra configuration necessary?

Thanks heaps for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants