Skip to content

Local app dev. on linux section fix #987

@djkato

Description

@djkato

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions