center1is a project for combining the analytical power of PostgreSQL and R-project worlds in a single optimized Docker-container for further prototyping and in-situ analytics.
Key features:
- PostgreSQL 18.1
- R 4.2.2 over PL/R
- opinionated set of R-packages including but not limited to:
- amazing data.table
- brilliant igraph
- trending duckdb
- author's pipenostics for domain-specific usage
- and many other packages that have proven to be effective author's domain-specific analytic routines.
🛈 The next instuctions are appropriate inside the project directorу
Select and edit the proper configuration file from conf-directory or create
your own:
MY_CONF="default" # do not specify subdirectory and extensionThen substitue postgresql.conf with the selected one:
sudo rm -f "$(pwd)/postgresql.conf"
cat "$(pwd)/conf/$MY_CONF.conf" > "$(pwd)/postgresql.conf"Provide readable/writable access:
sudo chown 999:999 "$(pwd)/postgresql.conf"Create an empty pgdata-directory for storing database data in appropriate
path:
POSTGRES_STORAGE="$(pwd)/pgdata"
sudo rm -rf "$POSTGRES_STORAGE"
mkdir "$POSTGRES_STORAGE"Provide readable/writable access:
sudo chown -R 999:999 "$POSTGRES_STORAGE"Run the fresh container:
docker run -d \
--name center1-"$MY_CONF"-01 \
-p 5432:5432 \
-v "$POSTGRES_STORAGE:/var/lib/postgresql/18/docker" \
-v "$(pwd)/postgresql.conf:/etc/postgresql/postgresql.conf" \
docker.io/omega1x/center1:v0.01 \
-c 'config_file=/etc/postgresql/postgresql.conf'Check basic accessability:
PGPASSWORD="a2026" \
psql \
--host=127.0.0.1 \
--username=api \
--dbname=center1 \
-P pager=off \
--command="SELECT true AS connection;"Check PL/R functionality:
PGPASSWORD="a2026" \
psql \
--host=127.0.0.1 \
--username=api \
--dbname=center1 \
-P pager=off \
--command="SELECT plr_version();"⚠ Use your value for the host parameter.
Use the trivial way to build the image:
docker image build --tag=docker.io/omega1x/center1:v0.01 $(pwd)