Faktencheck Database
The faktencheck database is provided within this repo as postgres database dump.
This readme contains instructions to quickly and easily set up postgres, load the data and access it.
In order to use the faktencheck database, we recommend to
Set up Podman (Preferred)
Installation instructions for the podman project are provided below.
-
Linux: Install podman and podman-compose with your package manager of choice. (for debian based distros:
podman and podman-compose are available as native packages in many distributions, like debian: podman podman-composesudo apt install podman podman-compose) -
If you have installed docker, set the compose provider for podman:
As stated in its manpage,export PODMAN_COMPOSE_PROVIDER=podman-composepodman compose is a thin wrapper around an external compose provider such as docker-compose or podman-compose.
. docker-compose takes precedence, but we want to use podman-compose. Changing the podman compose provider only changes which provider podman compose uses and does not change how docker works in any way. -
In case your distro has no configured registries, adding docker.io gets you going:
Registries contain already built containers. Anyone can host a registry and so Fedora ships with three different registries per default:echo 'unqualified-search-registries = ["docker.io"]' | sudo tee -a /etc/containers/registries.conf- docker.io
- registry.fedoraproject.org
- registry.access.redhat.com
If you know what you're doing, you can set your own choice of registry. Otherwise we recommend docker.io because it has proven to work in our testing.
In case your distro does not preconfigure registries, like on debian based distros, podman will let you know it needs a registry by throwing an error. -
MacOS: To install podman on macos run
This starts a very small Linux VM that you can stop withbrew install podman podman-composethen runpodman machine initandpodman machine startto complete setup.podman machine stop. You do not need any further setup commands as we neither need root nor the docker api.
Alternative: set up Docker (not recommended)
Using docker requires the docker daemon to run. Said daemon needs to run as root and consumes resources, whilst podman neither needs a daemon, to run as root, greatly reducing the attack vector. If we were to assume that this project was only deployed on reasonably powerful machines (which is a false assumption), there would still be the issue that the docker daemon running as root is a major point for exploitation. Just last month docker has received two CVEs rated critical (CVE-2025-7390, CVE-2025-9074).
Therefore its resource and security reasons that make us recommend podman over docker.
If however you still want or need to install docker, you can find information on how to do so on ubuntu below.
- Ubuntu: Follow instructions here: https://docs.docker.com/engine/install/ubuntu/ and https://docs.docker.com/engine/install/linux-postinstall/
Start containers with docker-compose.yml
To start up the containers, run the following command from this directory.
- Podman:
podman compose up -d - Docker (not recommended):
docker compose up -d
Note: If you have started the containers previously, they might be cached and you will get an error message with exit code 125 ('Error: creating container storage: the container name "kibad-postgres" is already in use by ... You have to remove that container to be able to reuse that name: that name is already in use, or use --replace to instruct Podman to do so. exit code: 125')
You can safely ignore these errors as long as the startup exit code is 0.
Load SQL Dump
Please make sure to wait a few seconds for all containers to start fully before trying to load the database.
- Import sql file to database:
podman exec -it kibad-postgres bash -c "gzip -cd /tmp/data/2025-11-05_pg-faktencheck_dump.sql.gz | psql -U postgres -d kibad"- With Docker:
docker exec -it kibad-postgres bash -c "gzip -cd /tmp/data/2025-11-05_pg-faktencheck_dump.sql.gz | psql -U postgres -d kibad"
- With Docker:
Note: If you have started the containers previously, they might be cached and you will get errors when re-importing the dump (or a newer dump). To fix this, the current solution is to delete the cached containers with
podman rm -f kibad-postgres && podman rm -f kibad-pgadmin
Then, rerun podman compose up -d followed by the import command.
Access pgAdmin
These are the steps for using pgAdmin to make the database accessible via api.
- Go to: http://localhost:8080
- Use login email "admin@admin.com" and pw "kibad" (see docker-compose!)
- Click "Add new server"
- General -> Name: "Postgres-Local"
- Connection
- Host name/address: "kibad-postgres"
- Port: 5432
- Username: "postgres" (see docker-compose!)
- Password: "kibad" (see docker-compose!)
- Access tables: Servers -> Postgres-Local -> Databases -> kibad -> Schemas -> public -> Tables
Stop containers
To shut down the containers, run the following command from this directory.
- Podman:
podman compose down - Docker:
docker compose down
Deprecated - Docker: Running from scratch
Postgres
- Download postgres:
docker pull postgres:latest - Create postgres container:
docker run --name kibad-postgres -e POSTGRES_PASSWORD=kibad -p 5432:5432 -d postgres - Create kibad database:
docker exec -it kibad-postgres psql -U postgres -c "CREATE DATABASE kibad"
SQL Dump
- Copy sql file to container:
docker cp directory_containing_sql_dump/2025-11-05_pg-faktencheck_dump.sql kibad-postgres:/2025-08-19_pg-faktencheck_dump.sql - Import sql file to database:
docker exec -it kibad-postgres psql -U postgres -d kibad -f /2025-11-05_pg-faktencheck_dump.sql
pgAdmin
- Create pgadmin container:
docker run --name kibad-pgadmin -e PGADMIN_DEFAULT_EMAIL=admin@admin.com -e PGADMIN_DEFAULT_PASSWORD=kibad -p 8080:80 -d dpage/pgadmin4
Network
- Create network:
docker network create kibad-network - Connect postgres:
docker network connect kibad-network kibad-postgres - Connect pgadmin:
docker network connect kibad-network kibad-pgadmin
Access pgAdmin
- Go to: http://localhost:8080
- Use login email "admin@admin.com" and pw "kibad"
- Click "Add new server"
- General -> Name: "Postgres-Local"
- Connection
- Host name/address: "kibad-postgres"
- Port: 5432
- Username: "postgres"
- Password: "kibad"
- Access tables: Servers -> Postgres-Local -> Databases -> kibad -> Schemas -> public -> Tables