2012-04-01 11:48:13 -06:00
|
|
|
lichess.org
|
|
|
|
===========
|
2012-02-19 04:55:30 -07:00
|
|
|
|
2012-06-18 06:36:49 -06:00
|
|
|
Backend of http://lichess.org
|
2012-04-25 14:15:35 -06:00
|
|
|
|
2012-06-18 06:36:49 -06:00
|
|
|
- Scala 2.9 with Play2, Akka 2, Scalaz and Salat
|
|
|
|
- [Scalachess](https://github.com/ornicar/scalachess)
|
|
|
|
- MongoDB 2
|
2012-04-25 14:15:35 -06:00
|
|
|
|
2012-06-18 06:36:49 -06:00
|
|
|
Installation
|
|
|
|
============
|
2012-04-25 14:15:35 -06:00
|
|
|
|
2012-06-18 06:36:49 -06:00
|
|
|
This is full-stack application, not a library, and it may not
|
|
|
|
be straightforward to get it fully running.
|
|
|
|
I assume you run a Unix with mongodb.
|
|
|
|
|
2012-08-01 02:44:04 -06:00
|
|
|
> Some steps of the installation will trigger a download of the galaxy. It will take ages.
|
2012-06-18 06:36:49 -06:00
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone git://github.com/ornicar/lila
|
|
|
|
cd lila
|
2012-07-30 16:31:07 -06:00
|
|
|
git submodule update --init
|
2012-08-01 02:44:04 -06:00
|
|
|
bin/build-play2
|
|
|
|
bin/play compile
|
2012-06-18 06:36:49 -06:00
|
|
|
```
|
|
|
|
|
2012-08-01 02:44:04 -06:00
|
|
|
Configuration
|
|
|
|
-------------
|
2012-06-18 06:36:49 -06:00
|
|
|
|
2012-08-01 02:44:04 -06:00
|
|
|
```sh
|
|
|
|
cp conf/local.conf.dist conf/local.conf
|
2012-06-18 06:36:49 -06:00
|
|
|
```
|
|
|
|
|
2012-08-01 02:44:04 -06:00
|
|
|
`conf/local.conf` extends `conf/base.conf` and can override any value.
|
|
|
|
Note that `conf/local.conf` is excluded from git index.
|
2012-06-18 06:36:49 -06:00
|
|
|
|
|
|
|
Run it
|
|
|
|
------
|
|
|
|
|
2012-08-01 02:44:04 -06:00
|
|
|
Launch the play console using your local configuration:
|
2012-06-25 05:56:13 -06:00
|
|
|
|
2012-08-01 02:44:04 -06:00
|
|
|
```sh
|
|
|
|
bin/play
|
2012-06-18 06:36:49 -06:00
|
|
|
```
|
2012-08-01 02:44:04 -06:00
|
|
|
|
|
|
|
From here you can now run the application (`run`).
|
|
|
|
Open your web browser at `localhost:9000`.
|
2012-08-01 03:38:07 -06:00
|
|
|
|
|
|
|
To run the test, use `test`.
|
2012-08-01 15:40:46 -06:00
|
|
|
|
|
|
|
Production
|
|
|
|
==========
|
|
|
|
|
|
|
|
Register as daemon on archlinux
|
|
|
|
--------------------------------
|
|
|
|
|
|
|
|
```sh
|
|
|
|
cd /etc/rc.d
|
|
|
|
sudo ln -s /path/to/lila/bin/prod/archlinux/rc.d/lila ./
|
|
|
|
cd /etc/conf.d
|
|
|
|
sudo ln -s /path/to/lila/bin/prod/archlinux/conf.d/lila ./
|
|
|
|
```
|
|
|
|
|
2012-08-01 15:41:56 -06:00
|
|
|
- Configure the daemon in /etc/conf.d/lila
|
|
|
|
- Add lila to DAEMONS in /etc/rc.conf
|
2012-08-01 15:40:46 -06:00
|
|
|
|
|
|
|
Restart on timeout
|
|
|
|
------------------
|
|
|
|
|
|
|
|
```sh
|
|
|
|
bin/prod/timeout-restarter
|
|
|
|
```
|