Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ Depending on which optional services you start:
To restart lila (after making changes to any Scala code):

```bash
docker compose restart lila
./lila-docker lila restart
```

### UI (JS/CSS) development:

To watch for Typescript/SCSS changes and automatically recompile:

```bash
docker compose run --rm ui /lila/ui/build --debug --watch
./lila-docker ui
```

### Updating Routes
Expand Down Expand Up @@ -215,7 +215,7 @@ By default, your local lila instance will use the version of chessground that is
3. Start the lila ui build in watch mode:

```bash
docker compose run --rm ui /lila/ui/build --debug --watch
./lila-docker ui
```

Then you can see the updated chessground demo at http://localhost:8090/demo.html and when you refresh lila, it will use the local copy of chessground.
Expand Down
29 changes: 25 additions & 4 deletions lila-docker
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,24 @@ load_config_to_env() {
}

show_help() {
echo "Usage: $0 [start|stop|restart|down|build|format|hostname|mobile|db]"
echo "Usage: $0 <action>"

echo "Actions:"
echo " start Start the containers"
echo " stop Stop the containers"
echo " restart Restart the containers"
echo " down Stop the containers and remove their volumes"
echo " build Pre-fetch and pre-build all the images necessary for the containers"
echo " format Run the code formatter to match Lichess code style"
echo " hostname Set the hostname to something different than the default localhost"
echo " mobile For mobile app development.Pair and connect to a mobile device"
echo " db Reset and re-seed the database with fresh fake data"
echo " lila clean Run 'sbt clean' in the lila container. Useful if there are compilation errors"
echo " lila restart Restart the lila container to apply changes to the codebase"
echo " ui Compile the frontend code. Runs in watch mode to automatically recompile on changes"
}

cd "$(dirname "$0")"

case $1 in
case "$@" in
--help|-h)
show_help
exit 0
Expand Down Expand Up @@ -168,6 +180,15 @@ case $1 in
db)
reset_database
;;
"lila clean")
docker compose run --rm --entrypoint "sbt clean" lila
;;
"lila restart")
docker compose restart lila
;;
ui)
docker compose run --rm ui /lila/ui/build --debug --watch
;;
*)
show_help
exit 1
Expand Down