-
-
Notifications
You must be signed in to change notification settings - Fork 82
WIP: Docs: Describe how to connect QField to local QFC dev instance. #1447
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -305,6 +305,29 @@ Now connecting with `curl` should fail with a similar error: | |||||||||
| establish a secure connection to it. To learn more about this situation and | ||||||||||
| how to fix it, please visit the web page mentioned above. | ||||||||||
|
|
||||||||||
| ## Connecting QField to a local QFieldCloud instance | ||||||||||
|
|
||||||||||
| In order to connect the QField mobile app to your local QFieldCloud development instance, the following prerequisites must be met: | ||||||||||
|
|
||||||||||
| - The QFieldCloud app container's ports must be exposed on the public interface (0.0.0.0) of your dev machine | ||||||||||
| To check this, run `docker compose ps app`. It should say `0.0.0.0:8011->8000/tcp`. | ||||||||||
| - Your dev machien and your mobile phone need to be on the same network (e.g. same WiFi) | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| - Find out the external IP address of the interface that the app container's HTTP port is bound to. | ||||||||||
| E.g. something like `ip -f inet addr show eth1` (make sure to pick the right interface if you have several NICs, like Ethernet and WiFi) | ||||||||||
| - For easier access via hostname, you need to have an mDNS service like avahi running on your dev machine. | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| On Linux, check that `avahi` is running: `systemctl status avahi-daemon` | ||||||||||
| If not, install `avahi-daemon` and make sure it's running. That should then allow you to access your dev machine as `<your-dev-machine-hostname>.local` from devices on the same network. E.g. if the hostname of your dev machine is `foo`, you should be able to reach it using `ping foo.local` from another machine on the same network. | ||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We tend to add new markdown with one sentence per line for better history tracking. |
||||||||||
| - In QFieldCloud's settings, the external IP address and hostname need to be added to `DJANGO_ALLOWED_HOSTS` | ||||||||||
|
|
||||||||||
| This should then be enough to connect the QField mobile app to your local QFieldCloud instance: | ||||||||||
|
|
||||||||||
| - Start QField | ||||||||||
| - When asked to sign in, double tap on the Nyuki logo to enter a custom QFieldCloud server URL | ||||||||||
| - Enter the URL using your mDNS hostname (or IP address, if mDNS doesn't work for you): | ||||||||||
| - `http://192.168.1.x:8011/` or | ||||||||||
| - `http://<your-dev-machine-hostname>.local:8011/` | ||||||||||
|
|
||||||||||
|
|
||||||||||
| ## Code style | ||||||||||
|
|
||||||||||
| Code style done with [`pre-commit`](https://pre-commit.com): | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what was the use case, but 95% of the time you better test the APIs using the desktop client, because you also have (easy) access to the configuration files. I guess it needs a bit of reordering, so in the injected paragraph above we can point to the bullet with instructions - start, type ip etc etc.