Skip to content

fmancusoit/olimpiadicms-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contest Management System Docker Version

Edited version of Contest Managment System for ITTS E. Scalfaro

Main Website olimpiadi.francescomancuso.it

Credits

All credits to Dockerfile goes to @tico88612

Support

System Support
Ubuntu 20.04
Ubuntu 22.04 ✅, Need to enable cgroup v1

Requirement

Enable cgroup v1 (Ubuntu 22.04)

Contest Management System is used ioi/isolate for sandbox, which is not supported cgroup v2 yet.

In Ubuntu 22.04, cgroup v1 default is not enabled. You need to enable it and reboot.

#!/bin/bash

echo 'GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=false systemd.legacy_systemd_cgroup_controller=false"' | sudo tee /etc/default/grub.d/70-cgroup-v1.cfg
sudo update-grub
sudo reboot

After that, you will need to check cgroup v1 is enabled.

mount | grep cgroup

This is success example output.

ubuntu@cms:~$ mount | grep cgroup
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755,inode64)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/misc type cgroup (rw,nosuid,nodev,noexec,relatime,misc)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)

Install Docker

Follow this manual to install Docker.

Installation

  1. Clone this project (include submodules)
git clone --recursive https://github.com/FrancescooM/olimpiadicms-docker.git
  1. If you want to change worker number, edit config/cms.conf and docker-compose.yml

  2. Copy .env.example to .env and edit CMS_SECRET_KEY, CMS_ADMIN_PASSWORD, CMS_RANKING_PASSWORD etc. (Contest has not been created yet, don't touch CMS_CONTEST_ID before creating the contest.)

cp .env.example .env
nano .env # Edit .env
  1. Build cms-base:latest image.
docker build -f images/cms-base/Dockerfile . -t cms-base:latest
  1. Up all service
docker compose up -d

Reference project

About

Piattaforma Olimpiadi di Informatica - Docker Version

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 72.1%
  • Dockerfile 27.9%