Skip to content

Commit

Permalink
docs: how to use local copy of Scalachess
Browse files Browse the repository at this point in the history
closes #9
  • Loading branch information
fitztrev committed Sep 27, 2023
1 parent eccd5f8 commit 62b054c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,20 @@ The only requirements for running on your local machine are `git` and Docker Des

Lila will be the last service to complete, at which point you can visit http://localhost:8080/ to see the site.

### Shutting down / Resetting
### Stopping

When you're done working, you can shut down the services with:
To stop the containers, for later resuming via `./lila-docker start`:

```bash
./lila-docker stop
```

When the `stop` command is used, `./lila-docker start` can be later used to resume the stopped services.
Alternatively, you can shut down and remove the services with:
To remove the containers:

```bash
./lila-docker down
```

When the `down` command is used, `./lila-docker start` can be later used to create and start new services.
## URLs

Always available:
Expand Down Expand Up @@ -125,6 +121,31 @@ Once the build has been imported, you should have code completion, go to definit

### Scalachess:

If you're making changes to the Scalachess library, you can have lila use it instead of the published Maven version:
1. Update the `build.sbt` file in the scalachess repo:
```diff
- ThisBuild / version := "15.6.7"
+ ThisBuild / version := "my-test-1" # give it a custom version
```
2. Update the `Dependencies.scala` file in the lila repo:
```diff
- val chess = "org.lichess" %% "scalachess" % "15.6.7"
+ val chess = "org.lichess" %% "scalachess" % "my-test-1"
```
3. Publish the local scalachess changes and restart lila:
```bash
docker compose exec lila bash -c "cd /scalachess && sbt publishLocal"
docker compose restart lila
```
Other Scalachess commands:
```bash
## compile
docker run --rm -v $(pwd)/repos/scalachess:/mnt \
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
- ./repos/chessground:/chessground
- ./repos/pgn-viewer:/pgn-viewer
- ./repos/bbpPairings.exe:/opt/bbpPairings.exe
- ./repos/scalachess:/scalachess
- ./conf/lila.conf:/lila/conf/application.conf

lila_ws:
Expand Down

0 comments on commit 62b054c

Please sign in to comment.