An OpenContest server written in Python
2022-03-10 10:57:54 -06:00
.github/workflows Modify workflow to only publish on release and simplify metadata extraction 2022-01-19 22:24:35 -06:00
conf Fix #38: Move configs to conf directory 2022-03-04 12:02:21 -06:00
ocs Add "txt" language 2022-03-10 10:57:54 -06:00
.gitignore Ignore all data directories 2022-01-17 12:43:23 -06:00
Dockerfile Use Debian stable for Dockerfile to avoid CI errors 2022-02-15 09:09:56 -06:00
LICENSE Create LICENSE 2021-06-15 17:13:50 +00:00
pyproject.toml Correctly package Python project 2022-01-15 19:58:53 -06:00
README.md Separate installation and usage in README 2022-01-24 08:57:40 -06:00
setup.cfg Bump version to 2.8.0 2022-03-04 12:02:58 -06:00

OpenContest Server

An OpenContest server written using Python's HTTPServer and SQLite, with no external dependencies other than the Python standard library, requests, and Firejail.

Installation

Docker

Run the Docker Hub image:

docker run -d -p 9534:9534 --name opencontest-server -v $PWD/contests:/usr/src/app/contests laduecs/opencontest-server:latest

Note: $PWD/contests is where the contests folder in the container is mapped to on the host and by default creates a new folder called contests in the current directory. It can be replaced with the full path to a different if desired.

AUR

Install the opencontest-server-git from the AUR:

paru -S opencontest-server-git

Start the server with systemctl start opencontest-server.

Pip

Install opencontest-server with pip:

pip install opencontest-server

Run the server with ocs.

Usage

You can place contests like the sample contest in a contests directory.

For debugging, you can run the server with the --verbose flag.

For production usage, you should put this server behind a reverse proxy like NGINX or Caddy because Python's HTTPServer does not implement any security features. You will also need to a domain name and a TLS certificate which you can easily obtain using Let's Encrypt.