This docker-compose
project aims to be a reliable and fast way to spin up a lichess
dev instance.
docker
anddocker-compose
- time, and preferably a coffee machine (or actually, weed)
lila_base
: A docker image based ondebian
:buster-20210816-slim
that packages Scala, Java & NodeJS, soon enough to be alpine-based.lila
: A docker image containing the lila server. (based onlila_base
)lila_ws
: A docker image containing the lila-ws server. (based onlila_base
)lila_db
: A docker image based onmongo
:4.0
, that automatically sets up the database schema for you.
An example nginx config is also avaible in the nginx_examples
folder.
Note: One may be tempted to replace the mongodb://db
and redis://redis
URLs with whatever their mind comes up with, but this is normal !
Linked docker containers will automatically have hostnames.
Note: If you're on windows (non-WSL), make sure your git
config is using Unix line endings (LF) and not Windows ones (CLRF).
- Clone or download this repo and
cd
into it - Build the lila_base image using
docker build -t phorcys420/lila_base lila_base/
- Edit the example configuration file located at
lila/data/application.conf.example
and rename it toapplication.conf
- Edit the CSRF origin in the example config file located at
lila_ws/data/conf.conf.example
and rename it toconf.conf
- Run
docker-compose up -d --build
from the main directory
OR
- Run
curl -o- https://raw.githubusercontent.com/phorcys420/lichess-docker/install-script/setup.sh | bash
- Edit the configuration file located at
lila/data/application.conf
- Edit the CSRF origin in the config file located at
lila_ws/data/conf.conf
- Run
docker-compose up -d
from the main directory
chess.lightcord.org. 1 IN A 78.198.182.162
chess.lightcord.org. 1 IN AAAA 2a01:e34:ec6b:6a20:7c67:ea98:c5dc:b648
lichess.lightcord.org. 1 IN CNAME chess.lightcord.org.
ws.chess.lightcord.org. 1 IN CNAME chess.lightcord.org.
Nginx config description :
chess.lightcord.org
being the main domain.
lichess.lightcord.org
being a redirect (301) to chess.lightcord.org
.
ws.chess.lightcord.org
being the websocket server for chess.lightcord.org
.
-
Stop all the Compose containers:
docker-compose down
-
Start all the Compose containers:
docker-compose up -d
-
Remove all the stopped Compose containers:
docker-compose rm
-
Start all the Compose containers and build the modified images:
docker-compose up -d --build
-
View container logs:
docker logs lila
-
Stop the Docker container:
docker stop lila
-
Open a shell in the running container:
docker exec -it lila bash
-
Attach to the Docker container (main process):
docker attach lila
-
Open a shell as root in the running container:
docker exec -u 0 -it lila bash
In the above commands, lila
is replaceable by lila_ws
, lila_db
and any container name in that manner.
- Get the
lila
Dockerfile to minify on git clone. - Get the
lichobile
container to serve lichobile. - Add fishnet.
- Add "play against the computer"
- Make
lila_base
alpine-based - Maybe find a better name