joaofazolo / boca-docker

A dockerized version of the BOCA Online Contest Administrator
GNU General Public License v3.0
21 stars 18 forks source link

:balloon: boca-docker

Build and publish multi-platform_Docker images on ghcr.io workflow Delete GitHub Actions cache for repository workflow Delete_untagged_and/or_unsupported_Docker_images_on_ghcr.io_workflow Close_stale_issues_and_PRs_workflow

Ubuntu JAMMY Ubuntu FOCAL Multi-Architecture

Google_Groups

Table of Contents

What Is BOCA?

BOCA Online Contest Administrator (known simply as BOCA) is an administration system to held programming contests (e.g., ACM-ICPC, Maratona de Programação da SBC). According to the developers, its main features are portability, concurrency control, multi-site and distributed contests, and a simple web interface (for details refer to https://github.com/cassiopc/boca).

BOCA is implemented mainly in PHP and makes use of a PostgreSQL database in the backend (see architecture below). It is a good example of a monolithic system, in which the user interface and database access are all interwoven, rather than containing architecturally separate components. The problem is compound due to the low readability and complex code structuring, which is hard to adapt and to extend.

Why boca-docker?

The boca-docker project is a use case of how we can take advantage of microservices architecture and containerization technology (i.e., Docker) to deploy applications in a more convenient and faster way (see illustration below). After quite some reverse engineering, we provide a multi-platform/arch Docker version of BOCA's main components (web app, online automated judge and database) aiming at easing the customization, extensibility and automation of the operational effort required to deploy, run and scale BOCA.

Original architecture boca-docker architecture
Alt text Alt text

This work started as part of the undergraduate final year project carried out by João Vitor Alves Fazolo under supervision of Prof. Dr. Rodrigo Laiola Guimaraes at Universidade Federal do Espirito Santo (UFES).

Requirements

Quick Start

How To Deploy It To A Swarm

How To Add Custom Configuration

There are many ways to customize the boca-docker application. Without trying to support every possible use case, here are just a few that we have found useful.

How To Run On Different Ubuntu Release Images

To run the boca-docker application built on top of different versions of Ubuntu images, please edit the docker-compose.prod.yml file with an alternative tag from the table below.

Tag name BOCA version Ubuntu version Code name Architecture
latest, 1.2, 1.2-jammy, 1.2.2, 1.2.2-jammy 1.5 22.04 LTS Jammy Jellyfish amd64, arm/v7, arm64/v8, ppc64le, s390x
1.2-focal, 1.2.2-focal 1.5 20.04 LTS Focal Fossa amd64, arm/v7, arm64/v8, ppc64le, s390x
nightly, nightly-jammy 1.5 22.04 LTS Jammy Jellyfish amd64, arm/v7, arm64/v8, ppc64le, s390x
nightly-focal 1.5 20.04 LTS Focal Fossa amd64, arm/v7, arm64/v8, ppc64le, s390x

For example, to use BOCA version 1.5 running on Ubuntu 20.04 LTS (Focal Fossa) on any supported architecture:

  ...
  services:
    ...

    # web app
    boca-web:
        image: ghcr.io/joaofazolo/boca-docker/boca-web:1.2-focal
    ...

    ...
    # online judge
    boca-jail:
        image: ghcr.io/joaofazolo/boca-docker/boca-jail:1.2-focal
    ...

Deprecated Image Tags

The following image tags have been deprecated and are no longer receiving updates:

How To Build It (For Development)

How To Publish It

NOTE: These instructions take into account the Docker images generated in the previous section (no multi-platform support).

How To Contribute

If you would like to help contribute to this project, please see CONTRIBUTING.

Before submitting a PR consider building and testing a Docker image locally and checking your code with Super-Linter:

  docker run --rm \
             -e ACTIONS_RUNNER_DEBUG=true \
             -e RUN_LOCAL=true \
             --env-file ".github/super-linter.env" \
             -v "$PWD":/tmp/lint \
             ghcr.io/super-linter/super-linter:latest

Known Issues

License

Copyright Universidade Federal do Espirito Santo (Ufes)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

This program is released under license GNU GPL v3+ license.

Support

Please report any issues with boca-docker at https://github.com/joaofazolo/boca-docker/issues