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

Add default environment variables to PWA #13

Open
NyanKiyoshi opened this issue Feb 27, 2020 · 3 comments
Open

Add default environment variables to PWA #13

NyanKiyoshi opened this issue Feb 27, 2020 · 3 comments
Labels
discussion enhancement New feature or request

Comments

@NyanKiyoshi
Copy link
Member

I received an email from somebody that was confused how to deploy the compose file as it would build with default environment variables, thus API_URL was set to localhost where in the case of that user, they needed it to point to a public IP address.

I suggest that we include those variables with the default values.

Those are (for dashboard):

Name Default
APP_MOUNT_URI http://localhost:9000/dashboard/
Adapt it for storefront, and check they have one.
API_URI http://localhost:8000/graphql/
STATIC_URL http://localhost:9000/
Please check it, not sure about it.

Otherwise, another solution, would be serving everything on the same port but with different path. Which is way easier, but we would need to add nginx for that in order to still be able to use npm start instead of npm run build.

@NyanKiyoshi NyanKiyoshi added the enhancement New feature or request label Feb 27, 2020
@tomaszszymanski129
Copy link
Member

The compose file that is located here is strictly for development - we state that in readme not to confuse people:

Keep in mind this repository is for local development only and is not meant to be deployed on any production environment! If you're not a developer and just want to try out Saleor you can check our live demo.

So if anybody tries to actually deploy it using compose he's doing it against the purpose of this package. I agree the deployment docs we have are out of date and they should be changed, we might as well think of preparing a compose file ready for production, i've seen on gitter that a lot of people tries to run it on a remote server for whatever purpose and experience a lot of issues since this is against design.

@NyanKiyoshi
Copy link
Member Author

Maybe one would want to be able to access it through an internal network without having to add a packet forwarding?

@subhankarshah
Copy link

@tomaszszymanski129
it would be great to have a docker-compose file for production and/or better documentation for production deployment, more power to you 👍 . also although i am not too familiar with the project let me know if i could contribute in some way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants