Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Installation (Docker)

Note: docker-based installation is work in progress. The docker files are not optimal nor secure for production.

In the current setup, the container is given read-write access to the repository root folder, because media files are stored in local/ and similar subfolders.

First, build the image and start the container:


Then, attach to the container:

docker attach skoljka

(This command might look stuck, press enter to see the interactive shell.)

Within the container, run the following:

cd /app

The default mysql root password is empty.

To run skoljka, run

cd /app
python2 runserver

and open http://localhost:8000/ . Set DEBUG in settings/ to True for CSS and JS files to work.

After closing the container, run the following to resume it:

docker start skoljka
docker attach skoljka
service mysql start  # Fails for some reason.
service mysql start  # Try again.


This procedure is based on the following tutorial:

NOTE: Consider using Docker installation above. The following installation procedure might be broken.

  1. Go to your projects folder (e.g. ~/projects). Create and go to a virtual environment:
sudo apt-get install gettext git python2.7-dev python-virtualenv
virtualenv -p `which python2` skoljka
cd skoljka
echo -e "export PYTHONPATH=\$PWD:\$PWD/skoljka:\$PYTHONPATH\nexport PROD=true\n\nsource bin/activate" > profile
source profile
  1. Clone skoljka and run the installation script:
git clone
cd skoljka
  1. Create an empty UTF8 database (use your username):
mysql -e "CREATE DATABASE skoljka CHARACTER SET utf8 COLLATE utf8_general_ci;" -u username -p
  1. Fill out settings/, at least the fields marked as REQUIRED.

  2. Initialize database and build:

python2 syncdb --noinput
python2 loaddata folders userprofiles

You can now use Django test server by running python2 runserver. The database is pre-filled with superuser arhiva whose password is a. Note that in settings/ the variable DEBUG is False by default, so static files won't be loaded correctly.

Configuring gunicorn

The following three sections are used only for running in the release mode.

You should now be in ~/projects/skoljka/skoljka/.

  1. Run cd .. to move to ~/projects/skoljka/.

  2. Create file (fill out user and group variables)

set -e

PORT=8079       # Internal port for non-static files

# user/group to run as

source profile

exec gunicorn skoljka.wsgi:application -w $NUM_WORKERS \
  --user=$USER --group=$GROUP --log-level=debug \
  --log-file=$LOGFILE -b localhost:$PORT
  1. Set up gunicorn.
chmod +x
mkdir -p logs
pip install gunicorn

Configuring supervisor

  1. Run the following commands:
sudo apt-get install supervisor
touch logs/gunicorn_supervisor.log
  1. Create file /etc/supervisor/conf.d/skoljka.conf (use sudo, and change these paths)
directory = /home/username/projects/skoljka/
command = /home/username/projects/skoljka/
user = username
stdout_logfile = /home/username/projects/skoljka/logs/gunicorn_supervisor.log
stderr_logfile = /home/username/projects/skoljka/logs/gunicorn_supervisor.log
  1. Run skoljka Django webserver:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl restart skoljka

Configuring nginx

  1. Install and start nginx:
sudo apt-get install nginx
sudo service nginx start
  1. Create /etc/nginx/sites-available/skoljka and the symlink /etc/nginx/sites-enabled/skoljka to the first file. Use e.g. 8080 as the main port and remember to redirect / to the port 8079. Look at the tutorial for the details.

  2. Restart nginx

sudo service nginx restart


End to end tests (E2E)

To run the E2E tests, first launch the test server in the Docker container: sh python2 testserver --noinput --traceback --addrport= skoljka/userprofile/fixtures/test_userprofiles.json

Then, run the tests: sh npx cypress run

Or, launch the GUI with: sh npx cypress open


Web archive of mathematical problems and a platform for online mathematics competitions






No packages published