-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add info about using FMTM and ODK tunnels during dev
- Loading branch information
1 parent
ca6e5a2
commit dd2eb71
Showing
1 changed file
with
48 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,61 +270,71 @@ You can now call the JOSM API from FMTM and changes will be reflected in the GUI | |
solution for this (an alternative is Ngrok). | ||
- To run the tunnel to the FMTM API: | ||
|
||
```bash | ||
docker compose \ | ||
-f docker-compose.yml \ | ||
-f contrib/tunnel/fmtm/docker-compose.yml \ | ||
up -d | ||
``` | ||
|
||
View the website to access FMTM remotely (e.g. via mobile): | ||
|
||
```bash | ||
docker compose \ | ||
-f docker-compose.yml \ | ||
-f contrib/tunnel/fmtm/docker-compose.yml \ | ||
logs api-tunnel | ||
``` | ||
```bash | ||
docker compose \ | ||
-f docker-compose.yml \ | ||
-f contrib/tunnel/fmtm/docker-compose.yml \ | ||
up -d | ||
``` | ||
|
||
- View the website to access FMTM remotely (e.g. via mobile): | ||
|
||
```bash | ||
docker compose \ | ||
-f docker-compose.yml \ | ||
-f contrib/tunnel/fmtm/docker-compose.yml \ | ||
logs api-tunnel | ||
``` | ||
|
||
- Now the final step is to add the provided tunnel URL to the allowed CORS origins. | ||
- Add to your `.env` file: | ||
|
||
```dotenv | ||
EXTRA_CORS_ORIGINS=https://the-url-you-were-given.trycloudflare.com | ||
``` | ||
```dotenv | ||
EXTRA_CORS_ORIGINS=https://the-url-you-were-given.trycloudflare.com | ||
``` | ||
|
||
- Then restart your API service: | ||
|
||
```bash | ||
docker compose restart api | ||
``` | ||
```bash | ||
docker compose restart api | ||
``` | ||
|
||
### Using local ODK Central on mobile | ||
|
||
- Sometimes you wish to use a project in your local ODK Central, via ODK Collect | ||
on your mobile. | ||
- To run the tunnel to the ODK Central API: | ||
|
||
```bash | ||
docker compose \ | ||
-f docker-compose.yml \ | ||
-f contrib/tunnel/odk/docker-compose.yml \ | ||
up -d | ||
``` | ||
```bash | ||
docker compose \ | ||
-f docker-compose.yml \ | ||
-f contrib/tunnel/odk/docker-compose.yml \ | ||
up -d | ||
``` | ||
|
||
- During project creation, set the ODK Central server URL to the provided tunnel | ||
address for the ODK Central API: | ||
- View the website to access ODK Central remotely (e.g. via mobile): | ||
|
||
```bash | ||
docker compose \ | ||
-f docker-compose.yml \ | ||
-f contrib/tunnel/odk/docker-compose.yml \ | ||
logs central-tunnel | ||
``` | ||
```bash | ||
docker compose \ | ||
-f docker-compose.yml \ | ||
-f contrib/tunnel/odk/docker-compose.yml \ | ||
logs central-tunnel | ||
``` | ||
|
||
1. Requirement: Restart ODK Central using the domain override | ||
(required for form download URLs): | ||
|
||
```bash | ||
CENTRAL_DOMAIN_OVERRIDE=tramadol-handbags-protecting-date.trycloudflare.com \ | ||
docker compose up -d central | ||
``` | ||
|
||
2. Requirement: During project creation, set the ODK Central server URL to the | ||
provided tunnel URL for the ODK Central API. | ||
|
||
> The credentials for the local ODK Central instance are: | ||
> Username: <[email protected]> | ||
> Password: Password1234 | ||
> The credentials for the local ODK Central instance are: | ||
> Username: <[email protected]> | ||
> Password: Password1234 | ||
|
||
- Now when you access the project via a QRCode on mobile, the connection to ODK | ||
Central should work. |