This is Bible texts in PostrgeSQL database packed into Docker container. It has the Russian Synodal Translation RST and the King James Version KJV versions.
Table names are start with bible version prefix:
CREATE TABLE VERSION_bible_books (
id SMALLINT NOT NULL PRIMARY KEY,
idx SMALLINT NOT NULL,
book VARCHAR(40) NOT NULL,
alt VARCHAR(20) NOT NULL,
abbr VARCHAR(20) NOT NULL,
UNIQUE (book, alt, abbr)
);
CREATE TABLE VERSION_bible (
book_id SMALLINT NOT NULL,
chapter SMALLINT NOT NULL,
verse SMALLINT NOT NULL,
text TEXT NOT NULL,
PRIMARY KEY (book_id, chapter, verse)
);
CREATE TABLE kjv_bible_daily (
id SERIAL PRIMARY KEY,
month SMALLINT NOT NULL,
day SMALLINT NOT NULL,
morning VARCHAR(1) NOT NULL,
evening VARCHAR(1) NOT NULL,
verses VARCHAR(1024) NOT NULL
);
You can get daily verses by month, day and daytime (morning or evening).
Verses goes in plain text with bible references: Phil 3:13,14 John 17:24; 2 Tim 1:12 Phil 1:6; 1 Cor 9:24,25 Heb 12:1,2
.
CREATE TABLE kjv_bible_daily_roberts (
month SMALLINT NOT NULL,
day SMALLINT NOT NULL,
verses VARCHAR(128) NOT NULL,
PRIMARY KEY (month, day)
);
This is Bible Companion by Robert Roberts.
Verses for each day the year which covers while Bible in one year. Verses in the same format as verse of the day.
Use docker-compose:
docker-compose up
It will build image if needed:
Creating network "docker-rst-bible-db_network" with the default driver
Building db
Step 1/6 : FROM postgres
---> 7a2907672aab
Step 2/6 : MAINTAINER <avdyushin.g@gmail.com>
---> Using cache
---> 6c71816b832a
Step 3/6 : COPY data/rst_bible_books.sql /docker-entrypoint-initdb.d/10-rst-bible-books.sql
---> 5dd2349d357c
Step 4/6 : COPY data/rst_bible_verses.sql /docker-entrypoint-initdb.d/20-rst-bible-verses.sql
---> 820b96d3e5f0
Step 5/6 : COPY data/kjv_bible_daily_verses.sql /docker-entrypoint-initdb.d/30-kjv-bible-daily-verses.sql
---> 167827c99771
Step 6/6 : COPY data/kjv_bible_daily_roberts.sql /docker-entrypoint-initdb.d/40-kjv-bible-daily-reading.sql
---> da09204caa9b
Successfully built da09204caa9b
Successfully tagged docker-rst-bible-db_db:latest
WARNING: Image for service db was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating docker-rst-bible-db_db_1 ... done
Attaching to docker-rst-bible-db_db_1
<...>
Once it's run you can connect using docker (find container id first):
docker ps
Execute psql
:
docker exec -it <container-id> psql -U docker -d bible
psql (11.0 (Debian 11.0-1.pgdg90+2))
Type "help" for help.
bible=# \c
You are now connected to database "bible" as user "docker".
bible=# \dt
List of relations
Schema | Name | Type | Owner
--------+-------------------------+-------+--------
public | rst_bible | table | docker
public | rst_bible_books | table | docker
public | rst_bible_daily | table | docker
public | rst_bible_daily_roberts | table | docker
(4 rows)
Just connect to Docker's IP address to port 5432
with docker
user and docker
password.
Database name is bible
.