Polis is an open-source online platform designed to enable a constructive exchange of opinions around a given topic. Sitra is introducing this democracy innovation in Finland in co-operation with DigiFinland. More information about Polis can be found at https://pol.is/home and at Sitra's website https://www.sitra.fi/en/projects/polis-platform-experiments/. Sitra's deployment of Polis was renamed as "Voxit" on 2025-09-01.
This project contains set of deploy scripts, settings files, custom patches, translations and utilities for running Polis deployments for Sitra.
Project uses Polis codebase with customizations and settings for Sitra. Patches from DigiFinland's Polis project are also included. Project uses Digifinland's participation frontend codebase with customizations for Sitra.
-
Clone this repository
-
Run
./scripts/fetch-submodule-repositories.shto fetch or update the Polis source and DF participation source -
Run
./scripts/apply-patches.shto apply Sitra and DigiFinland customizations to Polis and DF participation -
Add
polis.localentry to your local DNS or hosts file:127.0.0.1 polis.local -
Make a copy of sitra-example.env and modify to suit your local environment
-
Add NEXT_PUBLIC_RECAPTCHA_SITE_KEY to .env.development
-
Start the dev server using Docker Compose
./scripts/docker-compose_start.sh <env>
(where <env> is the name of your sitra-<env>.env environment)
- Browse to https://polis.local
When using the Docker Compose managed dev enviroment, the database will be initialized automatically.
When using an external PostgreSQL server, you must initialize the database structure manually.
Step 1. Create the database:
CREATE USER polis WITH PASSWORD 'password';
CREATE DATABASE polis WITH owner=polis;Step 2. Run database migrations:
cat polis/server/postgres/migrations/*.sql | psql -U polis polis
The apply-patches script applies the patches to a git branch, creating a new commit for each. The export-patches.sh script does the opposite: exports the commits in the branch into patch files.
Note: by convention, the commit message should start with either DF: or Sitra: to indicate the origin of the commit.
To upgrade Polis, do the following steps:
- Apply patches to the current polis repo
- Fetch changes from origin and choose the commit you wish to use as the new fork point
- Rebase the sitra branch onto that commit, correcting any conflicts that may arise (development work: ideally the rebase goes through without conflicts, but depending on upstream changes, this may require rewriting the modifications.)
- Test for regressions
- Write the branch origin commit ID into the
patches/forkfile - Run
scripts/export-polis-patches.shto re-export the branch and commit the changed patches
To upgrade DF-participation, do the following steps:
- Apply patches to the current df-participation repo
- Fetch changes from origin and choose the commit you wish to use as the new fork point
- Rebase the sitra branch onto that commit, correcting any conflicts that may arise (development work: ideally the rebase goes through without conflicts, but depending on upstream changes, this may require rewriting the modifications.)
- Test for regressions
- Write the branch origin commit ID into the
df-participation-patches/forkfile - Run
scripts/export-df-participation-patches.shto re-export the branch and commit the changed patches
The scripts directory contains a few helper scripts for Docker Compose. They take as argument the target environment name, which corresponds to a sitra-<env>.env file in the repository root.
docker-compose_start.sh <env>- start the application with the given envdocker-compose_stop.sh <env> [down]- stop the application. Ifdownis passed, docker-compose down is run to also remove the containers.docker-compose_logs.sh <env>- get docker logsdocker-compose_psql.sh <env>- run psql in the database container
Heads up! DF-participation local kubernetes configuration are not implemented yet. Use docker compose for development
Local Kubernetes configuration files are in ./manifests/local directory.
See skaffold.yaml for artifacts and build config.
Starts local Minikube cluster with metrics and ingress addons, and starts ingress tunnel:
./scripts/k8s_start-local-minikube.sh
Builds and deploys containers using Skaffold:
skaffold run
Alternatively, to use image pruning, you can run:
skaffold dev --no-prune=false --cache-artifacts=false
Polis is distributed under the AGPL license. All modifications used in the Sitra deployment are included in this repository.
Patches beginning with DF: originate from DigiFinland.
To get more information about this project, please write to us at [email protected].