Skip to content

treepeck/judo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MPL 2.0

Judo [JustChess-Docker] is a local development environment for justchess.org

Local installation

First install the Docker Engine or Desktop (see https://docs.docker.com/engine/install).

Secondly make sure that docker compose CLI tool is installed.

Once everything is ready, clone this repository:

git clone https://github.com/treepeck/judo
cd judo

Finally, execute ./judo.sh download (works via WSL on Windows) script that
will download the source code from GitHub repos.

Services

The JustChess project consists of the following services:

  • db - MySQL database that stores player's credentials, active sessions and
    completed games.
  • justchess - HTTP and WebSocket server, written in Go.
  • webpack - JS and CSS bundler.
  • mailpit - Email testing tool.

See docker-compose.yaml for details about the network ports used by these services.

Configuration files

docker-compose.yaml expects the following configuration files to be located in
the config folder:

  • db.env - defines the MySQL user credentials and database name.
  • db.conf - enables the MySQL event scheduler to clean up expired sessions.
  • justchess.env - defines the URL for connecting to the database.

Run services

To run all services, execute this command in the judo folder:

./judo.sh start

You might need to prefix this command with sudo if you haven’t configured
the system permissions for the Docker engine.

Display changes

Changes to Go files and templates requires rebuilding justchess service, while
changes to scripts and css are displayed automatically.

To restart the service, execute this command:

./judo.sh restart <service>

Migrations

justchess container includes the golang-migrate CLI tool to perform
migration-based schema updates. Once the justchess service is started
run ./judo.sh migration up to apply all *.up.sql migrations files
under the migrations folder.

For more details see judo.sh.

Run tests and benchmarks

Start the justchess service and execute this command:

./judo.sh test

Clean resources

The following commands will delete all resources, allocated by judo services:

./judo.sh stop
./juso.sh remove

You can also run docker system prune to clean the image build cache.

License

Copyright (c) 2025 Artem Bielikov

This project is available under the Mozilla Public License, v. 2.0.
See the LICENSE file for details.

About

Local development environment of justchess.org

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors