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

environment variables need updating #1068

Open
c-nv-s opened this issue Jan 9, 2024 · 3 comments
Open

environment variables need updating #1068

c-nv-s opened this issue Jan 9, 2024 · 3 comments
Labels
development question Further information is requested

Comments

@c-nv-s
Copy link

c-nv-s commented Jan 9, 2024

Whilst checking the documentation I noticed that it states that the environment variable PUBLIC_URL needs to be set as the location of where the saleor api is publicly reachable. https://docs.saleor.io/docs/3.x/setup/configuration#public_url

however that environment has no effect, and after a quick code search it appears the correct environment variable is APP_URL

  API_URL: "http://localhost:8000/graphql/",
  APP_MOUNT_URI: "/",
  APPS_MARKETPLACE_API_URI: "http://localhost:3000",
  APPS_TUNNEL_URL_KEYWORDS: ".ngrok.io;.saleor.live",
  IS_CLOUD_INSTANCE: "true",
  LOCALE_CODE: "EN",

in fact, searching all the above environment variables in the docs turns up nothing.

@aniav
Copy link
Contributor

aniav commented Apr 30, 2024

Hey @c-nv-s I just checked and the docs state that PUBLIC_URL:

Specifies the base URL at which Saleor is hosted, such as https://api.example.com/. This setting takes precedence over both ENABLE_SSL and Shop.domain (set using the GraphQL API) when generating URLs. Ensure to provide the complete URL, including the protocol: http:// or https://.

It doesn't say anything about the GraphQL API.

I also checked and search in the Saleor code doesn't have the APP_URL or API_URL env variables at all. app_url is used in apps but it has to be passed in the app manifest, so it seems like a different thing.

Am I looking at the right places?

@aniav aniav added the question Further information is requested label Apr 30, 2024
@c-nv-s
Copy link
Author

c-nv-s commented May 1, 2024

you can use the github magnifying glass on your repo to search your organization's code:
https://github.com/saleor/saleor-dashboard/blob/9c5e786522259d1dae2c1aeaf98dc8e8f5bc87dd/testUtils/setup.ts#L24

@aniav
Copy link
Contributor

aniav commented May 6, 2024

Ah I think this is where the confusion is happening. The docs mention PUBLIC_URL and it's a setting for the main Saleor repository https://github.com/saleor/saleor

There is no instruction for self-hosting saleor-dashboard in docs at that moment.

The dashboard setup is in the repository in:
https://github.com/saleor/saleor-dashboard/blob/main/docs/configuration.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants