Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 918 Bytes

File metadata and controls

36 lines (32 loc) · 918 Bytes

install

sudo apt install apache2 nginx
sudo apt install gcc libssl-dev build-essential pkg-config
sudo apt install docker docker-compose
git clone https://github.com/HumanCCompilerContest/HCCC_Infra.git

start nginx

mv nginx.conf /etc/nginx/nginx.conf
vim /etc/nginx/nginx.conf # remove line `include /etc/nginx/conf.d/*.conf; in nginx.conf`
mv hccc.conf /etc/nginx/conf.d/hccc.conf
systemctl start nginx

setup server

# https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal
sudo apt install snapd
sudo apt remove certbot # might be needed
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx

start server

cd HCCC_Infra/
git switch HCCC_001
sudo docker-compose up
export DATABASE_URL="postgres://non_manaka@localhost:5433/hccc_judge"
cargo build --release --bin judge_server 
cargo build --release --bin web_server