8000 GitHub - DGTDept/postgres-init: This repo used for mosip DB intialization.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DGTDept/postgres-init

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Postgres Initialization

Overview

This repo contains scripts to create postgres-init docker to initialize all the databases. Initialization includes creation of tables and populating essential default data.

Build

  1. Before building the docker create repos folder here.
    mkdir -p repos
    
  2. Fetch all the repositories
    ./get_db_data.sh <branch name>
    
  3. To manually build docker
    1. Review/change TAG that you need to create in docker_build.sh.
    2. Run docker_build.sh

Run SQL scripts from command line

  1. Set the following environment variables (given with an example below):

    • MOSIP_DB_NAME: This is the DB folder name from which scripts have to be executed. Eg. mosip_master.
    • DB_SERVERIP: Host name/IP of postgres server.
    • DB_PORT: Default 5432.
    • SU_USER: Super user. Default postgres
    • SU_USER_PWD: Super user password.
    • DEFAULT_DB_NAME: Specify postgres.
    • DBUSER_PWD: This is passed to the SQL scripts to create DB user, like, masteruser.
    • DML_FLAG: Some databases may required default data to be populated using DMLs. Set this flag to 0 or 1.
  2. Run the deploy script from inside db_scripts folder.

    cd repos/commons/db_scripts
    ./deploy.sh 
    

License

This project is licensed under the terms of Mozilla Public License 2.0.

About

This repo used for mosip DB intialization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 62.2%
  • Shell 20.7%
  • Dockerfile 17.1%
0