https://github.com/kachick/lishogi-dev
Run and develop lishogi.org on your machine
https://github.com/kachick/lishogi-dev
docker nix shogi
Last synced: about 2 months ago
JSON representation
Run and develop lishogi.org on your machine
- Host: GitHub
- URL: https://github.com/kachick/lishogi-dev
- Owner: kachick
- License: agpl-3.0
- Created: 2024-02-13T07:53:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-16T01:59:12.000Z (10 months ago)
- Last Synced: 2024-12-17T04:16:20.780Z (10 months ago)
- Topics: docker, nix, shogi
- Language: Nix
- Homepage:
- Size: 142 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# lishogi-dev
[](https://github.com/kachick/lishogi-dev/actions/workflows/ci-nix.yml?query=branch%3Amain+)
Set up environments to run [lishogi.org](https://lishogi.org/) and [develop](https://github.com/WandererXII/lishogi) on your local
## Usage
Install [Nix](https://github.com/DeterminateSystems/nix-installer), [Docker](https://www.docker.com/) and [direnv](https://github.com/direnv/direnv)
```bash
git clone git@github.com:kachick/lishogi-dev.git
cd lishogi-dev
direnv allow
task setup
docker compose up --detach # MongoDB, Redis, lila-ws(websocket), shoginet(engine)
# You can check the back-end logs via `docker compose logs [service-name]`
task prepare_db
```Replace shebang in `./repos/lishogi/ui/build` if you working on NixOS
```diff
-#!/bin/bash -ea
+#!/usr/bin/env -S bash -ea
``````bash
cd repos/lishogi
nix develop ../#lila # Enter in Nix dev shell, with nodejs, sbt
./ui/build
./lila # Enter in sbt console
``````console
[lila] $ compile
[lila] $ run
...
```Open [localhost:9663](http://localhost:9663/) in your web browser
If you want to stop the services
```console
[lila] $ exit
cd ../../
$ docker compose down
...
```_Happy Shogi!_
## FAQ
Q. Broken behavaior after upstream changes\
A. Update this repository to follow upstream, or run `task pin`Q. How to update this repo?\
A. Additional notes may be found in [CONTRIBUTING.md](CONTRIBUTING.md)## Motivation and concept
When I wanted a solution similar to [lichess-org/lila-docker](https://github.com/lichess-org/lila-docker) in lishogi, I couldn't find an overall solution.\
So I started this project. I prefer nix as possible rather than docker except for simple back-ends like databases.