ParadeDB is an advanced database system designed as an alternative to Elasticsearch but built on top of PostgreSQL. It aims to enhance PostgreSQL native capabilities by adding high-performance search and analytics features without the need for complex infrastructure.
This tutorial explains how to install ParadeDB inside a Docker container on Linux. Commands have been tested on Ubuntu.
Prepare environment
Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.
Install ParadeDB
Before starting, create directory for data:
sudo mkdir -p /opt/paradedb/data
Set user, which ID is 26 as owner for newly created directory:
sudo chown -R 26:999 /opt/paradedb
Note: it doesn't matter that user (ID: 26) doesn't exist on host system. This user will be created in the container.
- Host network
Run the following command to create a container for ParadeDB that uses host network:
docker run -d --name=paradedb --restart=always --network=host \
-v /opt/paradedb/data:/var/lib/postgresql/data \
-e POSTGRES_PASSWORD=pwd123 \
paradedb/paradedb
- User-defined bridge network
User-defined bridge network can be used for listening on different port. By default, ParadeDB service is listening on port 5432. It can be changed with -p
option.
docker network create app-net
docker run -d --name=paradedb --restart=always --network=app-net \
-p 8080:5432 \
-v /opt/paradedb/data:/var/lib/postgresql/data \
-e POSTGRES_PASSWORD=pwd123 \
paradedb/paradedb
Note: don't forget to change postgres
superuser password.
Testing ParadeDB
Run the following command to launch the PostgreSQL client (psql
) and list all the databases available on the server:
docker exec -it paradedb psql -U postgres -l
Output example:
List of databases
Name | Owner | Encoding | Locale Provider | Collate | Ctype | ICU Locale | ICU Rules | Access privileges
-------------------+----------+----------+-----------------+------------+------------+------------+-----------+-----------------------
postgres | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | |
template0 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
template_paradedb | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | |
(4 rows)
Uninstall ParadeDB
To completely remove ParadeDB, remove its container:
docker rm --force paradedb
Remove ParadeDB image:
docker rmi paradedb/paradedb
You can also remove ParadeDB data:
sudo rm -rf /opt/paradedb
If a user-defined bridge network was created, you can delete it as follows:
docker network rm app-net
Leave a Comment
Cancel reply