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

Local app dev. on linux section fix #987

Open
djkato opened this issue Oct 16, 2023 · 0 comments
Open

Local app dev. on linux section fix #987

djkato opened this issue Oct 16, 2023 · 0 comments
Labels

Comments

@djkato
Copy link

djkato commented Oct 16, 2023

Heyo, in https://docs.saleor.io/docs/3.x/developer/extending/apps/local-app-development#working-on-linux you claim that for development on linux, one needs to set change the network driver to host to work locally on an app, but that doesn't work.

Setting

networks:
  saleor-backend-tier:
    driver: host

throws error

─λ sudo docker compose run --rm api python3 manage.py migrate

[+] Creating 2/0
✔ Network saleor-platform_default              Created                                                                                                                                                                                                  0.0s 
✘ Network saleor-platform_saleor-backend-tier  Error                                                                                                                                                                                                    0.0s 
failed to create network saleor-platform_saleor-backend-tier: Error response from daemon: only one instance of "host" network is allowed

The only way to work with apps locally on linux that works for me is to use is to use my local IP instead -
So instead of http://localhost:3000/api/manifest or http://host.docker.internal:3000/api/manifest
Using for example http://10.0.0.5:3000/api/manifest works for me.

I'd recommend maybe remove the Linux and windows difference all together and recommend to use that, as it becomes consistent between operating systems and requires setting only a single address for:

APP_API_BASE_URL=http://10.0.0.5:3000
APP_IFRAME_BASE_URL=http://10.0.0.5:3000
@aniav aniav added the apps label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants