@@ -175,16 +175,13 @@ docker compose run --rm -w /scalachess --entrypoint="sbt package" lila
175
175
176
176
` ` ` bash
177
177
# # run formatter
178
- docker run --rm -v $( pwd) /repos/dartchess:/mnt --workdir /mnt dart:3.1.5-sdk \
179
- dart format .
178
+ docker compose run --rm -w /dartchess mobile dart format .
180
179
181
180
# # analyze
182
- docker run --rm -v $( pwd) /repos/dartchess:/mnt --workdir /mnt dart:3.1.5-sdk \
183
- bash -c " dart pub get && dart analyze"
181
+ docker compose run --rm -w /dartchess mobile bash -c " dart pub get && dart analyze"
184
182
185
183
# # run tests
186
- docker run --rm -v $( pwd) /repos/dartchess:/mnt --workdir /mnt dart:3.1.5-sdk \
187
- bash -c " dart pub get && dart test -x full_perft"
184
+ docker compose run --rm -w /dartchess mobile bash -c " dart pub get && dart test -x full_perft"
188
185
` ` `
189
186
190
187
# ## bbpPairings:
@@ -233,3 +230,48 @@ docker compose run --rm ui bash -c "cd /pgn-viewer && pnpm run sass-dev && pnpm
233
230
` ` `
234
231
235
232
See the changes on the PGN Viewer demo page: http://localhost:8091/
233
+
234
+ # ## Mobile
235
+
236
+ 1. On your host machine:
237
+ 1. Have the lila-docker services running, with the ` Mobile` optional service started
238
+ 2. Configure lila to run with your host' s IP address or hostname instead of localhost
239
+ ```bash
240
+ ./lila-docker hostname
241
+ ```
242
+ 3. Configure the mobile settings
243
+ ```bash
244
+ ./lila-docker mobile
245
+ ```
246
+ 4. Enter the IP address, port, and pairing code from the steps below
247
+ 2. On your Android phone:
248
+ 1. Connect your phone to the same wifi network as your host machine
249
+ 2. Ensure your phone and can access lila in your browser app using the host value you set above
250
+ ```
251
+ http://[your-selection]:8080
252
+ ```
253
+ 3. Enable Developer Mode
254
+ 4. In Developer Options
255
+ 1. enable wireless debugging
256
+ 2. Tap into the wireless debugging settings
257
+ 1. Use the "IP address & Port" value in the prompt on your host
258
+ 2. Tap "Pair device with pairing code"
259
+ 1. Enter the pairing port and code in the prompt on your host
260
+ 3. On your host machine:
261
+ 1. Get a shell on the container:
262
+ ```bash
263
+ docker compose exec -it mobile bash
264
+
265
+ # see your phone
266
+ adb devices
267
+ ```
268
+ 2. Install the app dependencies:
269
+ ```bash
270
+ flutter pub get
271
+ dart run build_runner build
272
+ ```
273
+ 3. Run the app:
274
+ ```bash
275
+ flutter run -v --dart-define=LICHESS_HOST=$LICHESS_URL --dart-define=LICHESS_WS_HOST=$LICHESS_URL
276
+ ```
277
+ - No substitutions necessary. The `$LICHESS_URL` environment variable will already be set on the container.
0 commit comments