Skip to content

Latest commit

 

History

417 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

This is the KSICHT chemistry competition website that allows elementary and high schools students to show off theirs skills on a series of challenging tasks.

The competition takes place annually and consist of 4 quaterly series that loosely follow the general school year, e.g. starts on autumn and finishes at late spring. Each series has approx. 5 tasks to complete and contenders will receive points for each task separately. They can also receive bonus badges for various acheievements. The contestant to receive the most points in total, wins.

Tech details

This app is built with Python powered by Django with the usual bells and whitles. Styling is based on the Bulma CSS framework. We use PostgreSQL as the database.

Development

Please make sure you have NVM installed first.

Installing

Activate NVM:

nvm use

There is a Makefile to simplify tasks. Start by creating your Python virtual env:

make init-env && source .env/bin/activate

Next, install dependencies including the dev and test stuff:

make install && make install-dev && make install-test

You will also need to boostrap your database. By default, a PostgreSQL database named ksicht is expected to exist on your local machine. This can be modified by overriding the DATABASE_DSN env variable when running the app.

First though, you'll need the database to exist:

createdb ksicht

Once there, initialize the database by issuing:

make migrate

This will run Django migrations & will create all the necessary tables.

Running the app

Just run this:

make run

Running tests

Again, use the Makefile:

make test

Building & deploying

This app is distributed as a Docker container and hosted on Docker Hub.

CI/CD Pipeline

A GitHub Actions workflow (.github/workflows/main.yml) automatically builds and pushes the Docker image on every push to master or when a version tag is created.

What happens automatically:

Trigger Docker Hub tags
Push to master latest, sha-<short>
Push tag vX.Y.Z latest, X.Y.Z, X.Y, X

Creating a release

After merging a PR to master, the image is automatically built and pushed as latest. To also create a named version:

git checkout master
git pull
git tag vX.Y.Z
git push origin vX.Y.Z

Local builds

Makefile provides commands for local builds:

make build                    # builds as ksicht/web:latest
make build VERSION=X.Y.Z      # builds as ksicht/web:X.Y.Z
make release                  # builds + pushes (latest by default)
make release VERSION=X.Y.Z    # builds + pushes as ksicht/web:X.Y.Z

About

This is the KSICHT annual chemistry competition website that allows elementary and high schools students to show off theirs skills on a challenging tasks.

Topics

Resources

Stars

4 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages