# zoj **Repository Path**: bestows_zth/zoj ## Basic Information - **Project Name**: zoj - **Description**: 开源在线评测系统,基于Vue+go-zero微服务架构 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 0 - **Created**: 2025-12-13 - **Last Updated**: 2025-12-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Zoj 在线判题系统 基于Vue+Go-zero框架的在线判题系统 ## 需要环境 - Mysql - Redis - GoCtl - Golang - RabbitMQ - Grpc - Etcd - Docker - 评测机(采用Native+Syscall的方案) **生成RPC代码** ```shell goctl rpc protoc service/user/rpc/user.proto --go_out=service/user/rpc --go-grpc_out=service/user/rpc --zrpc_out=service/user/rpc ``` **生成Api代码** ```shell goctl api go -api service/user/api/user.api -dir service/user/api ``` **评测机** - 评测机采用Docker容器化部署 > 也可以不用Docker部署,直接在评测机上运行评测机RPC程序,但是需要注意,可能会有危险,因为评测机RPC程序会直接在评测机上运行用户提交的代码,可能会导致评测机被攻击 1. 编译评测机RPC程序 ```shell go build -o bin/judge-rpc service/judge/rpc/judge.go ``` 2. 构建评测机Docker镜像 ```shell docker build -t zoj-judge:v1 -f service/judge/Dockerfile . ``` 3. 运行评测机容器 ```shell docker run -d --name zoj-judge --network host --restart unless-stopped zoj-judge:v1 ```