A small container to get an OMOP CDM Vocabulary Postgres database running quickly.
Drop your Vocabularies into vocabs/
, and run the container.
You can configure the Docker container using the following environment variables:
DB_HOST
: The hostname of the PostgreSQL database. Default isdb
.DB_PORT
: The port number of the PostgreSQL database. Default is5432
.DB_USER
: The username for the PostgreSQL database. Default ispostgres
.DB_PASSWORD
: The password for the PostgreSQL database. Default ispassword
.DB_NAME
: The name of the PostgreSQL database. Default isomop
.SCHEMA_NAME
: The name of the schema to be created/used in the database. Default isomop
.VOCAB_DATA_DIR
: The directory containing the vocabulary CSV files. Default isvocabs
.
docker run -v ./vocabs:/vocabs ghcr.io/AndyRae/omop-lite
# docker-compose.yml
services:
omop-lite:
image: ghcr.io/andyrae/omop-lite
volumes:
- ./vocabs:/vocabs
depends_on:
- db
db:
image: postgres:latest
environment:
- POSTGRES_DB=omop
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"
You can provide your own data for loading into the tables by placing your CSV files in the vocabs/
directory. This should contain .csv
files matching the vocab tables (DRUG_STRENGTH.csv
, CONCEPT.csv
, etc.).
The setup.sh
script included in the Docker image will:
- Create the schema if it does not already exist.
- Execute the SQL files to set up the database schema, constraints, and indexes.
- Load data from the
.csv
files located in theVOCAB_DATA_DIR
.