Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only clone repos necessary for selected services #13

Merged
merged 16 commits into from
Oct 26, 2023
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
27 changes: 23 additions & 4 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,38 @@ tasks:
ports:
- port: 8080
name: lichess
description: Your Lichess development site
description: Lichess dev site
onOpen: open-preview
- port: 8025
name: mailpit
description: For debugging emails
description: Email inbox
onOpen: ignore
- port: 8081
name: mongo-express
description: "For exploring database schema and contents (u: admin / p: pass)"
description: "Database explorer (u: admin / p: pass)"
onOpen: ignore
- port: 8089
name: API docs
onOpen: ignore
- port: 8090
name: chessground
onOpen: ignore
- port: 8091
name: pgn-viewer
onOpen: ignore
- port: 9666
name: lila-engine
description: External engine
onOpen: ignore
- port: 6175
name: lila-gif
onOpen: ignore
- port: 3001
name: picfit
onOpen: ignore
- port: 5601
name: kibana
description: For debugging Elasticsearch
description: Elasticsearch manager
onOpen: ignore

vscode:
Expand Down
43 changes: 22 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ The only requirements for running on your local machine are `git` and Docker Des

As an alternative to running it on your local machine, you can use Gitpod (a free, online, VS Code-like IDE) for contributing. With a single click, it will launch a workspace and automatically:

- Clone the necessary Lichess repositories
- Install all the dependencies
- Seed your database with test data
- Start your development site
- Clone the necessary Lichess repositories
- Install all the dependencies
- Seed your database with test data
- Start your development site

Click here to create a workspace:

Expand Down Expand Up @@ -56,12 +56,11 @@ To remove the containers:

Always available:

| Service | URL |
| ------------------ | ------------------------------------------- |
| Main lila instance | http://localhost:8080/ |
| Chessground demo | http://localhost:8080/chessground/demo.html |
| Mongodb manager | http://localhost:8081/ (admin/pass) |
| Email inbox | http://localhost:8025/ |
| Service | URL |
| ------------------ | ----------------------------------- |
| Main lila instance | http://localhost:8080/ |
| Mongodb manager | http://localhost:8081/ (admin/pass) |
| Email inbox | http://localhost:8025/ |

Depending on which optional services you start:

Expand All @@ -71,7 +70,8 @@ Depending on which optional services you start:
| Picfit | http://localhost:3001/healthcheck |
| Elasticsearch manager | http://localhost:5601/ |
| API docs | http://localhost:8089/ |
| PGN Viewer | http://localhost:8090/ |
| Chessground | http://localhost:8090/demo.html |
| PGN Viewer | http://localhost:8091/ |

## Usage

Expand All @@ -91,6 +91,14 @@ To watch for Typescript/SCSS changes and automatically recompile:
docker compose run --rm ui bash -c "/lila/ui/build -w"
```

## Updating Routes

If you edit the `conf/routes` file, you'll need to update the route cache.

```bash
docker compose exec lila bash -c "./lila playRoutes"
```

### To add translation keys:

After modifying a `translation/source/*.xml` file, run:
Expand All @@ -102,14 +110,7 @@ docker compose run --rm ui bash -c "/lila/bin/trans-dump"
### Code formatting:

```bash
docker compose run --rm ui bash -c "cd /lila && pnpm install && pnpm run format"
docker compose run --rm ui bash -c "cd /chessground && pnpm install && pnpm run format"
docker compose run --rm ui bash -c "cd /pgn-viewer && pnpm install && pnpm run format"

# sbt scalafmtAll
docker run --rm -v $(pwd)/repos/lila:/lila \
sbtscala/scala-sbt:eclipse-temurin-jammy-21_35_1.9.7_3.3.1 \
bash -c "cd /lila && sbt scalafmtAll"
./lila-docker format
```

### Berserk (Python library):
Expand Down Expand Up @@ -216,7 +217,7 @@ By default, your local lila instance will use the version of chessground that is
docker compose run --rm ui bash -c "/lila/ui/build -w"
```

Then you can see the updated chessground demo at http://localhost:8080/chessground/demo.html and when you refresh lila, it will use the local copy of chessground.
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.

### Developing PGN Viewer locally

Expand All @@ -226,4 +227,4 @@ To re-compile the PGN Viewer after making changes:
docker compose run --rm ui bash -c "cd /pgn-viewer && pnpm run sass-dev && pnpm run bundle-dev"
```

See the changes on the PGN Viewer demo page: http://localhost:8090/
See the changes on the PGN Viewer demo page: http://localhost:8091/
35 changes: 35 additions & 0 deletions command/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions command/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ edition = "2021"

[dependencies]
cliclack = "0.1.6"
strum = { version = "0.25.0", features = ["derive", "strum_macros"] }
Loading