Skip to content

daehyuh/domjudge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Domjudge 8.3 구축

Docker File 구성 docker-compose.yml

  • Mariadb (데이터베이스)
  • Domserver (웹서버)

docker-compose-checker.yml

  • judgehost-0 (채점 서버)
  • 필요에 따라 추가 생성 가능

Useage

Docker 설치

Set up Docker's apt repository.

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

Install the Docker packages.

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
sudo systemctl start docker

Domjudge 설치

Docker File 설치

git clone https://github.com/daehyuh/domjudge.git
cd domjudge

서버 한국시간 기준 변경

date
sudo timedatectl set-timezone Asia/Seoul 

MariaDB, Domserver 설치

sudo docker-compose up -d mariadb domserver

DomServer 설치 시 채점서버 비밀번호 확인가능

sudo docker exec -it domserver cat /opt/domjudge/domserver/etc/restapi.secret

# Format: '<ID> <API url> <user> <password>'
# default	http://localhost//api	judgehost 7UGT1gp1LsGzRixMQEUmFEKg01POxCWv

.env 파일에 채점서버 비밀번호 입력

sudo vi .env
restapi_password=7UGT1gp1LsGzRixMQEUmFEKg01POxCWv

채점서버 실행

sudo docker-compose -f docker-compose-checker.yml up -d

웹사이트 관리자 로그인

웹 접속을 위한 방화벽 개방 (환경마다 다를 수 있음)

sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 12345 -j ACCEPT

DomJudge 접속 localhost:12345

관리자 비밀번호 확인

sudo docker exec -it domserver cat /opt/domjudge/domserver/etc/initial_admin_password.secret

# ZTw4t_-OSK4ArGnp

아이디 : ADMIN 비밀번호 : ZTw4t_-OSK4ArGnp

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published