sio2project / sioworkers

GNU General Public License v3.0
11 stars 22 forks source link

Add Dockerfile and CI workflows building Docker images on new releases #12

Closed LiquidPL closed 1 year ago

LiquidPL commented 1 year ago

As mentioned in sio2project/oioioi#126, in this PR I'm adding a Dockerfile that builds a working Docker image for sioworkers. It might also be worth adding a GitHub Actions workflow that builds a new image after creating a new release, but I would prefer to consult with project maintainers on where the images should be published beforehand.

I've also noticed that there's an old Docker setup in docker/, however since it seems fairly old, I wasn't sure if it's being in active use, and if there's a point in updating it.

A-dead-pixel commented 1 year ago

I think there should also be a way to set the concurrency and memory limit via external environment variables.

LiquidPL commented 1 year ago

I've cleaned up the readme file and setup.py file from references to Python 2. The actual code will still need to be refactored to target Python 3 specifically.

Additionally, I've added workflows to run the tests on every push, and to publish a Docker image on every new release (we need to decide where to publish said images, though).

LiquidPL commented 1 year ago

I have updated the build action to push images to Docker Hub.

For it to work, the Docker Hub username and password/access token need to be configured as secrets in the repository settings:

Docker's documentation recommends creating an access token for the purpose of pushing images.

Additionally, a sio2project/sioworkers repository needs to be created in Docker Hub.