cleanup convenience scripts and update readme
parent
a30e5f6ba7
commit
9e054561b7
76
README.md
76
README.md
|
@ -15,80 +15,34 @@ 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.
|
||||
> This will take, naturally, ages.
|
||||
|
||||
Play 2.1
|
||||
--------
|
||||
|
||||
Interestingly enough, Play 2.1 lives in a repository named Play20.
|
||||
|
||||
```sh
|
||||
git clone git://github.com/playframework/Play20.git Play21
|
||||
cd Play21/framework
|
||||
./build build-repository
|
||||
./build publish-local
|
||||
```
|
||||
|
||||
Lila
|
||||
----
|
||||
|
||||
The database layer, website, cron tasks, websockets and whatnot.
|
||||
> Some steps of the installation will trigger a download of the galaxy. It will take ages.
|
||||
|
||||
```sh
|
||||
git clone git://github.com/ornicar/lila
|
||||
cd lila
|
||||
git submodule update --init
|
||||
play compile
|
||||
bin/build-play2
|
||||
bin/play compile
|
||||
```
|
||||
|
||||
Config is in `conf/application.conf`.
|
||||
|
||||
If all the above worked, which would be quite surprising, you can now setup a webserver and run the application.
|
||||
|
||||
Nginx
|
||||
-----
|
||||
|
||||
This is just my local nginx configuration, as an example.
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
```sh
|
||||
cp conf/local.conf.dist conf/local.conf
|
||||
```
|
||||
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 / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://127.0.0.1:9000/;
|
||||
}
|
||||
|
||||
error_page 500 501 502 503 504 /error.html;
|
||||
location = /error.html {
|
||||
root /home/thib/lila/public/;
|
||||
}
|
||||
}
|
||||
```
|
||||
`conf/local.conf` extends `conf/base.conf` and can override any value.
|
||||
Note that `conf/local.conf` is excluded from git index.
|
||||
|
||||
Run it
|
||||
------
|
||||
|
||||
Open lila play console and give it a ride.
|
||||
Launch the play console using your local configuration:
|
||||
|
||||
>To open a play console using development configuration, use:
|
||||
>
|
||||
> bin/dev
|
||||
>
|
||||
>This will use the `conf/application_dev.conf` configuration file.
|
||||
```sh
|
||||
bin/play
|
||||
```
|
||||
|
||||
```
|
||||
bin/dev
|
||||
[lila] $ run
|
||||
```
|
||||
From here you can now run the application (`run`).
|
||||
Open your web browser at `localhost:9000`.
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
play -Dconfig.file=conf/application_ai_server.conf
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
|
||||
$play = "/home/Play21/play";
|
||||
|
||||
function show_run($text, $command, $catch = false)
|
||||
{
|
||||
echo "\n* $text\n$command\n";
|
||||
passthru($command, $return);
|
||||
if (0 !== $return && !$catch) {
|
||||
echo "\n/!\\ The command returned $return\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
function show_run_catch($text, $command)
|
||||
{
|
||||
show_run($text, $command, true);
|
||||
}
|
||||
|
||||
function read_arg(array $argv, $index, $default = null)
|
||||
{
|
||||
return isset($argv[$index+1]) ? $argv[$index+1] : $default;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd play/framework
|
||||
./build build-repository
|
||||
cd -
|
2
bin/cli
2
bin/cli
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
play ";project cli;run $*"
|
||||
bin/play ";project cli;run $*"
|
||||
|
|
|
@ -71,7 +71,7 @@ object ApplicationBuild extends Build with Resolvers with Dependencies {
|
|||
"lila.ui",
|
||||
"lila.http.Context",
|
||||
"com.github.ornicar.paginator.Paginator")
|
||||
) dependsOn scalachess
|
||||
) dependsOn scalachess aggregate scalachess
|
||||
|
||||
lazy val scalachess = Project("scalachess", file("scalachess")).settings(
|
||||
resolvers := Seq(iliaz),
|
||||
|
|
Loading…
Reference in New Issue