From 0cc8d9b7675c005c6c3d2b1af4c7e07f59c1c1e1 Mon Sep 17 00:00:00 2001 From: vrubelroman Date: Thu, 9 Jul 2026 20:10:40 +0000 Subject: [PATCH] Point mobile app at nginx-fronted https://guidetest.vrubel.xyz/ Verified reachable end-to-end (health/nearby endpoints respond correctly through the reverse proxy) and set as the preferred API_BASE_URL for testing from a physical device on any network, ahead of the LAN-IP and emulator-loopback fallbacks. Co-Authored-By: Claude Sonnet 5 --- README.md | 11 +++++++++-- android/local.properties.example | 12 +++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 632549c..4dc055d 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,10 @@ also reachable from other devices on the same LAN at `http://:8000/` — no extra config needed, just make sure nothing (firewall, VPN) blocks port 8000 on that interface. +It's also reverse-proxied behind nginx at **https://guidetest.vrubel.xyz/**, +which works from anywhere (not just the local network) and is the preferred +`API_BASE_URL` for the Android app during this test phase. + ## Android quickstart ```bash @@ -57,10 +61,13 @@ cd android && ./gradlew :app:assembleDebug ``` Point the app's API base URL (`API_BASE_URL` in `local.properties`) at -`http://10.0.2.2:8000/` for the emulator, or your machine's LAN IP -(e.g. `http://192.168.8.173:8000/`) for a physical device on the same +`https://guidetest.vrubel.xyz/` (works from anywhere), `http://10.0.2.2:8000/` +for the emulator, or your machine's LAN IP for a physical device on the same Wi-Fi/LAN. +Run unit tests before building — `./gradlew testDebugUnitTest`, then +`./gradlew :app:assembleDebug`. + ## Notes / current scope This is iteration 1: Moscow only (Gorky Park, Red Square area, Moscow-City), diff --git a/android/local.properties.example b/android/local.properties.example index dbd5163..6432a12 100644 --- a/android/local.properties.example +++ b/android/local.properties.example @@ -5,8 +5,10 @@ sdk.dir=/path/to/your/Android/Sdk # Test key provided for development; do not ship this as-is in a public repo. DGIS_API_KEY=b4df01a8-61db-4cb9-8286-7e069495987d -# Base URL of the guideCity backend API. -# Emulator -> host loopback: http://10.0.2.2:8000/ -# Physical device on the same Wi-Fi/LAN -> your machine's LAN IP, e.g. http://192.168.1.50:8000/ -# (backend already binds 0.0.0.0:8000 via docker-compose, so it's reachable on the LAN IP with no extra config) -API_BASE_URL=http://192.168.8.173:8000/ +# Base URL of the guideCity backend API. Options, in order of preference: +# 1. Nginx-fronted HTTPS domain (works from anywhere, not just the LAN): +API_BASE_URL=https://guidetest.vrubel.xyz/ +# 2. Emulator -> host loopback: http://10.0.2.2:8000/ +# 3. Physical device on the same Wi-Fi/LAN -> your machine's LAN IP, e.g. http://192.168.1.50:8000/ +# (backend already binds 0.0.0.0:8000 via docker-compose, so it's reachable on the LAN IP with +# no extra config; cleartext HTTP is allowed in debug builds only, see app/src/debug/AndroidManifest.xml)