This is the microservice server of the SDUOJ.
Go to file
2022-10-22 23:02:43 +08:00
.github/workflows chore: change the version to 0.0.1 2022-10-22 23:02:43 +08:00
buildSrc chore: change the version to 0.0.1 2022-10-22 23:02:43 +08:00
config feat: logback settings (#151) 2022-03-10 21:45:22 +08:00
docker build: migrating builds from Maven to Gradle 2022-02-21 13:51:38 +08:00
gradle/wrapper build: migrating builds from Maven to Gradle 2022-02-21 13:51:36 +08:00
sduoj-auth refactor: update the config file 2022-03-11 20:05:58 +08:00
sduoj-common refactor: build script 2022-03-11 20:02:13 +08:00
sduoj-contest refactor: fix error filesys package layer naming (#183) 2022-03-20 14:31:02 +08:00
sduoj-filesys refactor: fix error filesys package layer naming (#183) 2022-03-20 14:31:02 +08:00
sduoj-gateway refactor: update the config file 2022-03-11 20:05:58 +08:00
sduoj-problem refactor: fix error filesys package layer naming (#183) 2022-03-20 14:31:02 +08:00
sduoj-submit refactor: update the config file 2022-03-11 20:05:58 +08:00
sduoj-user refactor: update the config file 2022-03-11 20:05:58 +08:00
sduoj-websocket refactor: update the config file 2022-03-11 20:05:58 +08:00
.gitignore chore: update .gitignore 2022-03-11 20:00:31 +08:00
build.gradle.kts build: migrating builds from Maven to Gradle 2022-02-21 13:51:38 +08:00
gradle.properties fix: subproject compilation failed (#170) 2022-03-10 21:41:49 +08:00
gradlew build: migrating builds from Maven to Gradle 2022-02-21 13:51:36 +08:00
gradlew.bat build: migrating builds from Maven to Gradle 2022-02-21 13:51:36 +08:00
LICENSE upload license (#52) 2020-10-08 12:00:41 +08:00
microservice.Dockerfile build: multi-platform docker images 2022-10-22 16:53:49 +08:00
README.md add healthCheck in Dockerfile, update the default port of service (#106) 2020-11-27 18:33:18 +08:00
sduoj.sql Refactor: redesign some fields of the data table. 2020-04-03 17:49:24 +08:00
settings.gradle.kts refactor: build script 2022-03-11 20:02:13 +08:00

SDUOJ Server

This is the service server of the SDUOJ.

Solution Stack

  • Spring Boot
  • Spring Cloud
  • MyBatis
  • MyBatis-Plus
  • Lombok
  • MapStruct

Run

  • pull image:
docker pull registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server
  • Run it (take the gateway as an example):
docker run -di \
  --name=sduoj-gateway \
  --publish=8080:8080 \
  --pids-limit=1024 \
  --cpu-shares=100 \
  --memory=2048M \
  --memory-swap=2048M \
  -e NACOS_ADDR=127.0.0.1:8848 \
  -e ACTIVE=prod \
  -e SERVICE=gateway \
  registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server
  • Docker params:

    • --publish: the container's port to the host
    • --pids-limit: the limit of process in container
    • --cpu-shares: the relative weight of cpu
    • NACOS_ADDR: the host of Nacos
    • ACTIVE: dev or prod
    • SERVICE: gateway, auth, user, problem, filesys, submit, contest or websocker
  • Run all micro-services at once:

docker run -di --pids-limit=1024 --cpu-shares=100 --memory=2048M --memory-swap=2048M \
  --name=sduoj-auth      -e SERVICE=auth      --publish=19010:8080 \
  -e NACOS_ADDR=127.0.0.1:8848 -e ACTIVE=prod registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server

docker run -di --pids-limit=1024 --cpu-shares=100 --memory=2048M --memory-swap=2048M \
  --name=sduoj-contest   -e SERVICE=contest   --publish=19011:8080 \
  -e NACOS_ADDR=127.0.0.1:8848 -e ACTIVE=prod registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server

docker run -di --pids-limit=1024 --cpu-shares=100 --memory=2048M --memory-swap=2048M \
  --name=sduoj-filesys   -e SERVICE=filesys   --publish=19012:8080 \
  -e NACOS_ADDR=127.0.0.1:8848 -e ACTIVE=prod registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server

docker run -di --pids-limit=1024 --cpu-shares=100 --memory=2048M --memory-swap=2048M \
  --name=sduoj-gateway   -e SERVICE=gateway   --publish=8080:8080 \
  -e NACOS_ADDR=127.0.0.1:8848 -e ACTIVE=prod registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server

docker run -di --pids-limit=1024 --cpu-shares=100 --memory=2048M --memory-swap=2048M \
  --name=sduoj-problem   -e SERVICE=problem   --publish=19013:8080 \
  -e NACOS_ADDR=127.0.0.1:8848 -e ACTIVE=prod registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server

docker run -di --pids-limit=1024 --cpu-shares=100 --memory=2048M --memory-swap=2048M \
  --name=sduoj-submit    -e SERVICE=submit    --publish=19014:8080 \
  -e NACOS_ADDR=127.0.0.1:8848 -e ACTIVE=prod registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server

docker run -di --pids-limit=1024 --cpu-shares=100 --memory=2048M --memory-swap=2048M \
  --name=sduoj-user      -e SERVICE=user      --publish=19015:8080 \
  -e NACOS_ADDR=127.0.0.1:8848 -e ACTIVE=prod registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server

docker run -di --pids-limit=1024 --cpu-shares=100 --memory=2048M --memory-swap=2048M \
  --name=sduoj-websocket -e SERVICE=websocket --publish=19016:8080 \
  -e NACOS_ADDR=127.0.0.1:8848 -e ACTIVE=prod registry.cn-beijing.aliyuncs.com/sduoj/sduoj-server