oj-lab-platform

module
v0.0.0-...-116ffa8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: MPL-2.0

README

OJ Lab Platform

GitHub Workflow Status codecov Codespace Supported

Central service for OJ Lab, supporting distributed deployment.

Development

🌟 Accept VSCode extension recommandation for complete experience.

Before you start

OJ Lab Platform depends on several foundational services, including:

  • PostgreSQL (or other SQL database in the future) for data storage
  • Redis for caching & session management
  • MinIO (or other S3 like storage) for file storage
  • ClickHouse for analytics (currently not developed)
  • Judger for judging

This project provides a Makefile to help you quickly set up dependencies & other optional choices. Run make setup-dependencies to start these services and load the initial data.

Launch from VSCode

Launch the programs with VSCode launch configurations is the most recommended way. It will automatically set the environment and run the program in debug mode.

Run Judger

There is a judger service in the project's docker-compose.yml. It won't start from the make setup-dependencies command by default (since it takes time to let MinIO & PostgreSQL start up).

Run docker-compose up -d judger to start the judger service.

Manage DB data

We provide adminer to access PostgreSQL data. You can optionally run docker-compose up -d adminer to start the service, or just continue to use your own database management tool.

Remember to set the type of the database to PostgreSQL when login to adminer.

Troubleshooting

go bin not included in PATH

# You should change .zshrc to .bashrc if you are using bash
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc

Directories

Path Synopsis
cmd
rpc_server
Deprecated currently Keep it for future use
Deprecated currently Keep it for future use
modules
log
services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL