Lesser fork of lichess. https://spacecruft.org/deepcrayon/lila
Go to file
2013-06-05 20:03:30 +02:00
app update sockets more often 2013-06-05 17:59:14 +02:00
bin new server for ai 2013-06-04 18:05:35 +02:00
conf sk "slovenĨina" translation #2569. Author: JuBu. 2013-06-05 18:00:31 +02:00
doc user app compiles 2013-05-08 12:41:12 -03:00
modules troll player and spectator messages are hidden to others 2013-06-05 20:03:30 +02:00
project remove sonatype snapshots repository 2013-06-03 12:14:54 +02:00
public fix js number of online users 2013-06-05 19:47:11 +02:00
serve Use the /serve directory to expose large files with the webserver 2012-05-29 00:33:28 +02:00
test move User.nb* to User.Count.* 2013-06-02 13:04:18 +02:00
.gitignore play 2.1.2-RC1 2013-05-16 20:40:39 -03:00
.gitmodules show user timeline on homepage 2013-05-24 15:49:02 +02:00
README.md add nginx and hosts config to the readme 2013-06-05 10:36:10 +02:00
todo hide home left column to anon 2013-06-05 17:07:19 +02:00

lichess.org

Complete source code of http://lichess.org, using Scala 2.10.1, Play 2.1, Akka 2, ReactiveMongo and Scalaz

Installation

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.

Some steps of the installation will trigger a download of the galaxy. It will take ages.

git clone git://github.com/ornicar/lila
cd lila
git submodule update --init
bin/play compile

Configuration

cp conf/application.conf.dist conf/application.conf

application.conf extends base.conf and can override any value. Note that application.conf is excluded from git index.

Language subdomains

When accessed from the root domaing (e.g. lichess.org), the application will redirect to a language specific subdomaing (e.g. en.lichess.org). Additionally, lichess will open websockets on the socket. subdomain (e.g. socket.en.lichess.org). Here is my local nginx configuration for l.org, assuming lila is installed in /home/thib/lila and runs on port 9000.

# Websockets
server {
  listen 80;
  server_name ~^socket\.\w\w\.l\.org$;

  location / {
    include lila-proxy.conf;
    proxy_read_timeout 5s;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_pass http://127.0.0.1:9000/;
  }
}

# Application
server {
  listen 80;
  server_name l.org ~^\w\w\.l\.org$;

  location /assets {
    alias   /home/thib/lila/public;
  }

  location /serve {
    alias   /home/thib/lila/serve;
  }

  location /import {
    proxy_set_header Host $http_host;
    proxy_read_timeout 60s;
    proxy_pass http://127.0.0.1:9000/import;
  }

  location / {
    add_header "X-UA-Compatible" "IE=Edge,chrome=1"; 
    proxy_set_header Host $http_host;
    proxy_read_timeout 90s;
    proxy_pass http://127.0.0.1:9000/;
  }
}

And the /etc/hosts file looks like:

127.0.0.1	l.org
127.0.0.1	en.l.org
127.0.0.1	fr.l.org
127.0.0.1	socket.en.l.org
127.0.0.1	socket.fr.l.org

Run it

Launch the play console:

bin/play

From here you can now run the application (run).